GTFreeFlyer Posted June 22, 2020 Share Posted June 22, 2020 In my script, I'm using world.event.S_EVENT_KILL to detect when scenery objects are destroyed. As of now, I've tested on scenery objects and also on static objects. I use event.initiator:getPlayerName() to get the name of the player who killed the object. Everything works fine EXCEPT if the player dies before the object does. For instance, drop some bombs and then eject or fly straight into the ground before the object is dead and you get a script error: attempt to index field 'initiator' (a nil value) The player must continue to be alive at the time of the object's death. This is usually true, but there are times where it takes the burning building a few minutes to "die" and in that time you could get shot down or crash. If so, you get a pop-up and script error. Yes, I have set env.setErrorMessageBoxEnabled(false) to prevent this, but thought the dev team would like to know about this issue. Cheers. My DCS Missions: Band of Buds series | The End of the T-55 Era | Normandy PvP | Host of the Formation Flight Challenge server Supercarrier Reference Kneeboards IRL: Private Pilot, UAS Test Pilot, Aircraft Designer, and... eh hem... DCS Enthusiast Link to comment Share on other sites More sharing options...
Grimes Posted June 22, 2020 Share Posted June 22, 2020 Reported. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
Recommended Posts