Doctor's Bag and use_obj_on_p_proc

bbmultipass

First time out of the vault
I have a code that don't work:

Code:
procedure map_enter_p_proc begin

  critter_injure(self_obj, DAM_CRIP_LEG_RIGHT);
  
end

procedure use_obj_on_p_proc begin

  if (obj_pid(obj_being_used_with) == PID_DOCTORS_BAG) then begin
    script_overrides;
    set_global_var(GVAR_INJURED_FRANK, STATE_QUEST_COMPLETED);
    give_exp_points(100);
    display_mstr(100);
  end

end


How i can check using of Doctor's Bag?

Or are there some functions to check crippled status?
 
I had the same problem when I tried to fix Bess in Modoc earlier, as she can't be healed with the doctors bag.
I'm pretty sure both the doctors bag and the medkit has any script override function disabled in the engine, or at least that was my conclusion at the time.

Looking at some old notes I have, I may have something that could be of use.
Code:
Check to see if critter has a crippled left leg:

        if not ((critter_state(self_obj) bwand 4) == 0) then begin

Though I assume you want to check if he doesn't have a crippled left leg. That would probably be:

        if ((critter_state(self_obj) bwand 4) == 0) then begin

together with some variable check to only do it once of course.
 
Thanks Darek, that works perfectly for me, even using this:

Code:
if not (critter_state(self_obj) bwand DAM_CRIP_LEG_LEFT) then
 
Back
Top