TheTrooper Posted April 17, 2021 Posted April 17, 2021 Hi, is there a way on a trigger action that a static unit can be removed from the map? ----------------------------------------------- Intel® Core™i7 Quad Core Processor i7-6700 (3.4GHz) 8MB Cache | 32GB HyperX FURY DDR4 2133MHz | MSI GeForce RTX 2070 ARMOR 8G |SSD 1TB 970 EVO Plus M.2
StevanJ Posted April 17, 2021 Posted April 17, 2021 You can deactivate a group but only destroy a static via an explosion (That i know of)..
toutenglisse Posted April 17, 2021 Posted April 17, 2021 4 hours ago, TheTrooper said: Hi, is there a way on a trigger action that a static unit can be removed from the map? On trigger action you can either use the mission editor "destroy unit" (like StevanJ said with an explosion) or use a "do script" box and copy/paste this text (same destroy function but from script, that doesn't employ explosion but simply remove the static unit, named 'Static test' in my example ) : if StaticObject.getByName('Static test') and StaticObject.getByName('Static test'):isExist() == true then StaticObject.getByName('Static test'):destroy() end .miz example attached. (Static unit is removed after 2 second in mission) test-despawn-static.miz
TheTrooper Posted April 24, 2021 Author Posted April 24, 2021 On 4/18/2021 at 12:15 AM, toutenglisse said: On trigger action you can either use the mission editor "destroy unit" (like StevanJ said with an explosion) or use a "do script" box and copy/paste this text (same destroy function but from script, that doesn't employ explosion but simply remove the static unit, named 'Static test' in my example ) : if StaticObject.getByName('Static test') and StaticObject.getByName('Static test'):isExist() == true then StaticObject.getByName('Static test'):destroy() end .miz example attached. (Static unit is removed after 2 second in mission) test-despawn-static.miz 5.73 kB · 2 downloads Ah nice one. Thanks for that ----------------------------------------------- Intel® Core™i7 Quad Core Processor i7-6700 (3.4GHz) 8MB Cache | 32GB HyperX FURY DDR4 2133MHz | MSI GeForce RTX 2070 ARMOR 8G |SSD 1TB 970 EVO Plus M.2
Recommended Posts