WurschtBanane 11 Posted May 20, 2017 I want to use the Garbage collector, but make sure it does NOT remove the 7 Dead bodies i placed in the editor (Soldier with 0% Health). If you want to recommend me a script, make sure there is a way to NOT delete these Bodies, not delete Stuff in front of peoples faces and only delete Bodies when they have been lying around for a time. Share this post Link to post Share on other sites
crewt 31 Posted May 21, 2017 You can try this one: removeFromRemainsCollector But I never really touched the Garbage collector so... theoretically Share this post Link to post Share on other sites
Midnighters 152 Posted May 22, 2017 Just like crewt said: removeFromRemainsCollector[unit1,unit2,unit3,unit4,unit5,unit6,unit7]; //etc 1 Share this post Link to post Share on other sites
anfo 118 Posted October 19, 2017 On 5/21/2017 at 8:47 AM, crewt said: You can try this one: removeFromRemainsCollector Popped into init.sqf and works, as long as AI death is delayed after game start to allow removeFromRemainsCollector to initialise. Could anybody help with code to delay a _unit setdamage 1 to a unit or units by say 10 seconds? Share this post Link to post Share on other sites
R3vo 2654 Posted October 19, 2017 1 hour ago, anfo said: Popped into init.sqf and works, as long as AI death is delayed after game start to allow removeFromRemainsCollector to initialise. Could anybody help with code to delay a _unit setdamage 1 to a unit or units by say 10 seconds? _unit spawn {sleep 10; (_this setDamage 0;}; Share this post Link to post Share on other sites
anfo 118 Posted October 20, 2017 12 hours ago, R3vo said: _unit spawn {sleep 10; (_this setDamage 0;}; Thanks @R3vo! It appears a ")" was missing but they was easy enough to solve. However can you or somebody else assist me to understand the logic? First, would this code belong in the unit's init or server init? Second, I read it as when an AI spawns, a 10 second delay of damage 0 (alive) exists? Share this post Link to post Share on other sites
xjoker_ 25 Posted October 20, 2017 _unit is the parameter you give to the spawned script. In the script's scope you access to _unit by using the magic variable _this Basically, what this script does is waiting 10 secondes, and then heal the unit. If you want to kill it you have to use setDamage 1 instead of 0. Share this post Link to post Share on other sites
R3vo 2654 Posted October 20, 2017 12 hours ago, anfo said: Thanks @R3vo! It appears a ")" was missing but they was easy enough to solve. However can you or somebody else assist me to understand the logic? First, would this code belong in the unit's init or server init? Second, I read it as when an AI spawns, a 10 second delay of damage 0 (alive) exists? Sorry, that was my mistake. Yes a bracket was missing and I typed 0 instead of 1. Share this post Link to post Share on other sites
anfo 118 Posted October 21, 2017 Thank you to all for your kind input. I try to pick up on code language where I can but it can be difficult sometimes to understand the speak. Does this code go into the AI init whom I want this to occur? You see I only have 8 AI (out of possibly 100's more) that I want to be excluded from the garbage collector. edit; ah wait, is it something like: _kill = [unit_1, unit_2]; _kill spawn {sleep 10; (_this setDamage 1);}; Share this post Link to post Share on other sites