Throwing coin

Lich

Water Chip? Been There, Done That
I want ask, do someone known how made it better?
Already i just used method to remove and add different item to inventory. The same script is used in two items and its work. But i want do this else way: coin will change in hands (not go to inventory after throw)

Here is my coin script:

Code:
procedure start;
procedure use_p_proc;

procedure start begin
end

procedure use_p_proc begin
variable eagle;
variable head;
variable los;
eagle:=create_object(568,0,0); 
head:=create_object(569,0,0); 
los:=random(1,2);

if (obj_is_carrying_obj_pid(dude_obj, 568) >=1 and (los==1)) then begin
add_obj_to_inven(dude_obj,head);
float_msg(dude_obj,mstr(200),8); 
remove_pid_qty(dude_obj, 568, 1)
end else

if (obj_is_carrying_obj_pid(dude_obj, 568) >=1 and (los==2)) then begin
add_obj_to_inven(dude_obj,eagle);
float_msg(dude_obj,mstr(100),8); 
remove_pid_qty(dude_obj, 568, 1)
end else

if (obj_is_carrying_obj_pid(dude_obj, 569) >=1 and (los==1)) then begin
add_obj_to_inven(dude_obj,eagle);
float_msg(dude_obj,mstr(100),8);
remove_pid_qty(dude_obj, 569, 1)
end else

if (obj_is_carrying_obj_pid(dude_obj, 569) >=1 and (los==2)) then begin
add_obj_to_inven(dude_obj,head);
float_msg(dude_obj,mstr(200),8);
remove_pid_qty(dude_obj, 569, 1)
end
end


And msg content:

{100}{}{Eagle}
{200}{}{Head}
 
Try using wield_obj_critter function.
Code:
if (obj_is_carrying_obj_pid(dude_obj, 568) >=1 and (los==1)) then begin
add_obj_to_inven(dude_obj,head);
float_msg(dude_obj,mstr(200),8);
remove_pid_qty(dude_obj, 568, 1)
wield_obj_critter(dude_obj,head);
end else
 
Thanx, i will try it.
Anyway am wonder how is made flare (change item graphic after use)
 
Maybe "playanim" or something, i only imagine it that way: item frm with two frames, when you use it: next frame is played and stop here. Probably impossible put into hands some other item.
 
Back
Top