why isnt this working with critter as obj?works when i insert dude_obj
and this is calling function
when set to add to dude it works correctly
edit : this is in an ondeath hook
Code:
procedure Scrounger_Perks(variable critter)
begin
critter_flags := get_proto_data(obj_pid(critter), 32);
//display_msg("Fired");
if (not(critter_flags bwand 32)) then begin
if (has_fake_perk(ExtraGold) and (get_sfall_global_int(182) == 1)) then begin
item_caps_adjust(critter, get_sfall_global_int(183) * has_fake_perk(ExtraGold));
//add_mult_objs_to_inven(obj_dude */critter*/, create_object_sid(PID_BOTTLE_CAPS, 0, 0, -1), (get_sfall_global_int(183) * has_fake_perk(ExtraGold)));
//display_msg("Settings : " + get_sfall_global_int(183) * has_fake_perk(ExtraGold));
end
if (has_fake_perk(ExtraAmmo)) then begin
call has_weapon(critter);
end
end
end
and this is calling function
Code:
critter := get_sfall_arg;
...
call Scrounger_Perks(critter);
when set to add to dude it works correctly
edit : this is in an ondeath hook
Last edited: