Pikey Posted April 9, 2017 Share Posted April 9, 2017 (edited) (static is from the static list, not a unit that is standing still) I'm trying to write something in LUA that detects if a static is alive or dead, can anyone help, please? Is it just counted as a UNIT in that case? Edited April 9, 2017 by Pikey ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING * Link to comment Share on other sites More sharing options...
Pikey Posted April 9, 2017 Author Share Posted April 9, 2017 I tried if not Group.getByName("p1") then env.info("Static p1 is dead") else env.info("Static p1 is alive") end And it always returns dead, even when it is alive. ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING * Link to comment Share on other sites More sharing options...
Pikey Posted April 9, 2017 Author Share Posted April 9, 2017 Ah...found it if StaticObject.getLife(StaticObject.getByName('p1')) < 1 then env.info("Static p1 is dead") else env.info("Static p1 is alive") end 1 ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING * Link to comment Share on other sites More sharing options...
sea2sky Posted April 10, 2017 Share Posted April 10, 2017 good find i5-9600K@4.8GHz ★ 32Gb DDR4 ★ Asus TUF rtx3080 OC ★ Quest Pro ★ Warthog on Virpil base Link to comment Share on other sites More sharing options...
Recommended Posts