I'm implementing a limited crafting ability. This is an excerpt from a script attached to a workbench:
procedure Node006a begin//10 mm pen pistol.
variable item;
variable skill;
if ( (obj_is_carrying_obj_pid(dude_obj, PID_ALLOY_PIPE) > 1) and (has_skill(dude_obj, SKILL_REPAIR) > 9) ) then begin
gfade_out(ONE_GAME_MINUTE);
game_time_advance(ONE_GAME_HOUR);
remove_pid_qty(dude_obj, PID_ALLOY_PIPE, 1)
give_pid_qty(dude_obj, PID_10MM_PEN_PISTOL, 1)
gfade_in(ONE_GAME_MINUTE);
call Node016;//you did it
end
else begin
call Node017;//you did not did it
end
end
The point is I always get Node017 even if the Pc has both the item and the required skill. I have a merchant selling my new protos, and I checked that the rigt objects are spowned: I'm positive I have the right object in my inventory. Script mistake? Any tips?
procedure Node006a begin//10 mm pen pistol.
variable item;
variable skill;
if ( (obj_is_carrying_obj_pid(dude_obj, PID_ALLOY_PIPE) > 1) and (has_skill(dude_obj, SKILL_REPAIR) > 9) ) then begin
gfade_out(ONE_GAME_MINUTE);
game_time_advance(ONE_GAME_HOUR);
remove_pid_qty(dude_obj, PID_ALLOY_PIPE, 1)
give_pid_qty(dude_obj, PID_10MM_PEN_PISTOL, 1)
gfade_in(ONE_GAME_MINUTE);
call Node016;//you did it
end
else begin
call Node017;//you did not did it
end
end
The point is I always get Node017 even if the Pc has both the item and the required skill. I have a merchant selling my new protos, and I checked that the rigt objects are spowned: I'm positive I have the right object in my inventory. Script mistake? Any tips?