Jump to content

Recommended Posts

Posted

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.

I enjoy creating content for the community.  Missions, lua scripts, and kneeboards.  Follow my content on my Discord, GT’s Runway.  https://discord.gg/GHH7bVZ7K6

 IRL: Private Pilot, UAS Test Pilot, Aircraft Designer, and... eh hem... DCS Enthusiast

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...