Jump to content
Sign in to follow this  
daimyo21

Incremental Damage? Need specific help.

Recommended Posts

So Im trying to create a really basic zombie and I want his attack to do incremental damage when distance < 3-5m. I understand setdamage command.

But say I have a condition that the zombie is within distance, than on Act: player setdamage .03. If its on repeat it just keeps the play damaged at .03. How do I make it like player setdamage +.03 while zombie is <3-5m away he will incrementally take .03 damage every second until he dies etc.

Id like to put this into a script. I have a script thatll trigger when in distance but dont know what command to place for activation.

Also is this possible without scripts? Im just wondering if thatd be possible too.

Any workaround would be great. Thanks!

Share this post


Link to post
Share on other sites

Best result in a script, first you need a eventhandler or something to check when to activate function

zombiedamage.sqf

_hit=0.3;
while {(_unit alive) && (_unit distance _zombie < 5)}
do 
{
_unit setdammage hit;
_hit=(_hit+0.3)
sleep 2;
};

have fun

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×