Page 1 of 1

add explosion

Posted: Sun Apr 19, 2020 2:26 pm
by orca
I am trying to create an explosion on a runway using LUA

I'm using this script but nothing happens when it's run. The runway is located at the lat/long indicated in the script.

ScenEdit_AddExplosion({warheadid=1049, lat=-19.2540607452393, lon=146.761245727539, altitude=0})

Is there anything I need to do differently to make it work?


RE: add explosion

Posted: Sun Apr 19, 2020 3:15 pm
by stilesw
I am trying to create an explosion on a runway using LUA

I'm using this script but nothing happens when it's run. The runway is located at the lat/long indicated in the script.

ScenEdit_AddExplosion({warheadid=1049, lat=-19.2540607452393, lon=146.761245727539, altitude=0})

Is there anything I need to do differently to make it work?

Peter,

I've used AddExplosion several times and did encounter a problem if the altitude was set below the ground.
Your coordinates seem to be in Australia,S19, E146. At that point the elevation is ~500ft above ground so your altitude=0 puts the detonation ~500ft underground. Try changing it to an altitude say 10ft above the altitude on the map display and it should work.

Hope this helps,

-WS

RE: add explosion

Posted: Sun Apr 19, 2020 5:43 pm
by orca
Thanks. Adjusting the altitude did the trick.