Hello, people.
I'm trying to make a weapon which would paralyze/knock-out opponents. Could be useful for slave raids, etc. So far, I had no luck with it.
I made the item, it deals slight electrical damage. I added the following to the OBJ_DUDE.int:
Now, all the target critter does, is say "ouch!". I tried removing the animation code, but no change.
I also tried putting a version of this code in the damage_p_proc procedure in the test critter, and the results were as above.
I thought maybe it's the fault of the combat mode, so I put the code in the description_p_proc procedure to see if it worked out of combat.
Well, the critter would say "Ouch!" and it would fall to the ground (as ordered by the animation code), but it wouldn't be kocked-out. I could normally talk to it, etc., while what I want to achieve, is to have the critter unconscious, so I could search it, etc.
Worse still, when I initialised combat, it would stand up and attack me.
So, if you have any ideas how to solve this problem, I'd be very greatful. Thanks in advance.
-------------EDIT---------------------
Forgot to say, I'm using a regular F2 1.02. UK version, I don't have sFall installed.
I'm trying to make a weapon which would paralyze/knock-out opponents. Could be useful for slave raids, etc. So far, I had no luck with it.
I made the item, it deals slight electrical damage. I added the following to the OBJ_DUDE.int:
Code:
procedure combat_p_proc begin
if (fixed_param == COMBAT_SUBTYPE_HIT_SUCCEEDED) then begin
if ((obj_pid(critter_inven_obj(self_obj,INVEN_TYPE_RIGHT_HAND)) == PID_TASER) or (obj_pid(critter_inven_obj(self_obj,INVEN_TYPE_LEFT_HAND)) == PID_TASER)) then begin
float_msg(target_obj,"OUCH!",FLOAT_MSG_RED);
reg_anim_clear(target_obj);
reg_anim_begin();
reg_anim_animate(target_obj,ANIM_fall_back,-1);
reg_anim_end();
critter_injure(target_obj,DAM_KNOCKED_OUT);
end
end
end
Now, all the target critter does, is say "ouch!". I tried removing the animation code, but no change.
I also tried putting a version of this code in the damage_p_proc procedure in the test critter, and the results were as above.
I thought maybe it's the fault of the combat mode, so I put the code in the description_p_proc procedure to see if it worked out of combat.
Well, the critter would say "Ouch!" and it would fall to the ground (as ordered by the animation code), but it wouldn't be kocked-out. I could normally talk to it, etc., while what I want to achieve, is to have the critter unconscious, so I could search it, etc.
Worse still, when I initialised combat, it would stand up and attack me.
So, if you have any ideas how to solve this problem, I'd be very greatful. Thanks in advance.
-------------EDIT---------------------
Forgot to say, I'm using a regular F2 1.02. UK version, I don't have sFall installed.