=Odin= 0 Posted June 21, 2008 G'day, I have searched and read lots of great post/replies on this issue, but I cant get it to work. What I want is to be able to delete deadBodies after a Condition is met. At the moment I have a trigger called "burybod" and this script; <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#Loop ?! alive a1: goto "remove" _dead = _this select 0; _overall_dead = _overall_dead + [_dead]; hint "works" goto "loop" #remove hint "part2" _goaway = {hidebody _x} forEach (list burybod) {if (typeOf _x != "logic") then {{deleteVehicle _x} forEach crew _x;deleteVehicle _x};} forEach (list burybod) hint "end" This deletes vehicles and burys any Dead after the condition is met, but still leaves the bodies of those who died before the trigger was tripped. I am trying my hardest to get the dead into an Array so I can delete the bods but Alas, Can someone enlighten me on what I need to do to acheive this please? Cheers Odin Share this post Link to post Share on other sites
Rommel 2 Posted June 22, 2008 I'm not entirely sure what your trying to achieve. Are you trying to clear a single trigger only? And whom are you exempting from this trigger. Also what type of trigger is burybod, and how is the code above executed? Romm Share this post Link to post Share on other sites
=Odin= 0 Posted June 22, 2008 Heya Mate, sorry for being vague, was under the influence of VB when I wrote it, cans of green death What I want to Acheive is clear a Trigger area of the living and dead aswell as vehicles of all sides once an objective or condition is met. For testing purposes I am just using the Death of a unit "a1" to move to the removal part of the script. the bury bod trigger; activation-anybody-repeatedly type-none name- burybod condition-true activation- <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x addeventhandler ["killed", {[_this select 0, _this select 1] exec "count.sqs"}]} foreach thislist; No one is exempt, as the player will be at the next mission area when triggered. Thx Share this post Link to post Share on other sites
Linker Split 0 Posted June 22, 2008 Try to leave condition: this Share this post Link to post Share on other sites
=Odin= 0 Posted June 23, 2008 Heya Linker split , Changed condition to this, no errors, but still won't work, other than deleteing all the living. Is trying to get the Dead into an Array the way to go? do I have to init the Array "_overall_dead "? at the moment I have this in the init, not sure if it is the rightway to call it overall_dead = 0; EDIT; solved it, if any one is interested let me know thanxs Odin Share this post Link to post Share on other sites