yea would be the best solution,donno if it is possible tho
edit : looked at trying to swap inven to temp box in deathanim2 then swap back in ondeath,it carshes the game when swapping in deathanim2,dont think it is possible
edit : after messing with it for a while,i have it working,if the death anim is 30(electricuted to nothing) then swap to temp /*done in hs_deathanim2.int*/
then in hs_ondeath.int swap from temp box to critter,heh tested by forcing the death anim and killing sulik over and over
put this in hs_deathanim2 and compile
Code:
procedure start;
procedure start
begin
variable weapon_pid := 0;
variable attacker := 0;
variable target := 0;
variable damage := 0;
variable engine_calc_death_anim := 0;
variable temp_box := 0;
if (init_hook) then begin
end
else begin
weapon_pid := get_sfall_arg;
attacker := get_sfall_arg;
target := get_sfall_arg;
damage := get_sfall_arg;
engine_calc_death_anim := get_sfall_arg;
if (engine_calc_death_anim == 30) then begin
temp_box := create_object_sid(128, 0, 0, -1);
set_sfall_global("elec_box", temp_box);
move_obj_inven_to_obj(target, temp_box);
set_sfall_global("eleccrit", target);
end
end
end
and put this in hs_ondeath and compile
Code:
procedure start;
procedure start
begin
variable critter := 0;
if (init_hook) then begin
end
else begin
critter := get_sfall_arg;
if (get_sfall_global_int("eleccrit") == critter) then begin
move_obj_inven_to_obj(get_sfall_global_int("elec_box"), critter);
destroy_object(get_sfall_global_int("elec_box"));
set_sfall_global("elec_box", 0);
set_sfall_global("eleccrit", 0);
end
end
end
it worked for me in testing,adding this to my mods,excellent idea
edit : @DForge download custom perks from my site and use only hs_ondeath.int and hs_deathanim2.int,should work,let me know if you have any problems
edit : added explode to death to the code
edit :
LionXavier said:
-As you already know, both the desintegration and explosion death animations make the critter's inventory
actualy i didnt know that,when i made the perk "Explosive Ending"
(causes every critter that has explode art,to explode on death) i did all the testing on a critter that had no inven(ants in temple i believe tho it has been months),and i always play as an unarmed dude,thank you,i can see that no one would use that perk without the code i wrote today,wish id seen it back when i did the testing
thank you again
Nirran