Pappy60 10 Posted September 29, 2009 Is there a way to setdamage at something besides completely disabled? I want to damage a helo but not bring it down, at least at first, I would like to repeat the damage every so many seconds until it is down. Right now I have a 60 second delay trigger with activation of: vehicle (thisList select 0) setdamage 1; So if the helo spends too much time in the hot LZ it will be disabled and kills everyone onboard. It would be nice to just sustain damage a few times before it gets completely destroyed. Any ideas? Share this post Link to post Share on other sites
rekrul 7 Posted September 29, 2009 Use decimal instead, like 0.1. Share this post Link to post Share on other sites
Pappy60 10 Posted September 29, 2009 cool, they should update the biki on that...thanks ---------- Post added at 07:46 PM ---------- Previous post was at 06:12 PM ---------- Hmmm, Okay the decimals are working well, but I can't seem to do it multiple times with a sleep function. I am trying this in the activation and the first one works but the sleep ones don't: hint format ["taking damage"]; vehicle (thisList select 0) setdamage 0.4; null = spawn {sleep 10; vehicle (thisList select 0) setdamage 0.6}; null = spawn {sleep 10; vehicle (thisList select 0) setdamage 0.8}; null = spawn {sleep 10; vehicle (thisList select 0) setdamage 1}; Share this post Link to post Share on other sites
kylania 568 Posted September 29, 2009 Not sure "thislist" would be accessable within the spawn code blocks. Best to just put the damage stuff inside a script and simply have the trigger call the script. on Act: hint "Taking Damage!"; nul = [thisList select 0] execVM "slowDamage.sqf"; slowDamage.sqf = _vic = _this select 0; _vic setDamage 0.4; sleep 10; _vic setDamage 0.6; sleep 10; _vic setDamage 0.8; sleep 10; _vic setDamage 1; Share this post Link to post Share on other sites
Pappy60 10 Posted September 29, 2009 Absolutely perfect ! Thank you!!!! Share this post Link to post Share on other sites
Big_Daddy 10 Posted September 29, 2009 Not to throw a monkey in the wrench.. But kylania wouldn't your script allways kill the helo? Once the helo left the trigger, the script would still run. correct? How about on deactivation, you terminate the script? Share this post Link to post Share on other sites
Pappy60 10 Posted September 29, 2009 Just so I learn, what is the "_vic" just a name for the variable of the unknown vehicle? So if I understand correctly you are setting variable _vic to the vehicle in the trigger list position zero ? I really want to learn so I don't have to ask so many questions :) ---------- Post added at 08:17 PM ---------- Previous post was at 08:16 PM ---------- Good point, I had not thought of that, before when I was simply using the trigger without a script, if I exited the trigger no further damage occured. Share this post Link to post Share on other sites
kylania 568 Posted September 29, 2009 So would the spawn triggers. All of them would spawn at the same, they wouldn't go sequentially and they wouldn't deactivate after something left the trigger zone. I hadn't actually read the first post, was just rewriting the last one. For a hot zone that kills you it would be pretty similar though, just each kill check if it's in the trigger or not. Pappy, is the intention of this that ONLY the helo take damage if it's in the area too long? And yes, _vic was just a general local variable I made up to save typing. Share this post Link to post Share on other sites
Pappy60 10 Posted September 29, 2009 The whole point of the trigger is to put pressure on the pilot to quickly enter the LZ and extract the unit and get out in a timely fashion. If the pilot can land load and get out of the 250m trigger zone within 60 seconds he will only have very minor ground fire damage, but if he is slow approaching landing and loading , he will start incurring heavy damage every 10 seconds....but if he can excape the trigger zone before being destroyed with all units onboard ..he has succeeded ---------- Post added at 08:23 PM ---------- Previous post was at 08:21 PM ---------- Yes just the helo is supposed to be damaged. ---------- Post added at 09:11 PM ---------- Previous post was at 08:23 PM ---------- okay after a bunch of searching I can't seem to figure out how to deactivate the script upon exiting the trigger zone. In the deact field I tried: slowDamage = false; But this didn't work.... I am thinking this is easy to turn off a trigger or reset it or just stop the script but so far can't find it.... Share this post Link to post Share on other sites
shuko 59 Posted September 29, 2009 onAct: dmgScriptHandle = [thisList select 0] execVM "slowDamage.sqf"; onDeAct: terminate dmgScriptHandle; However, it might need the trigger to be set as repeatable (which could cause need to change the condition). Share this post Link to post Share on other sites
Pappy60 10 Posted September 29, 2009 Thanks SHK , worked like a charm :) Share this post Link to post Share on other sites