add explosion

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
orca
Posts: 545
Joined: Wed Nov 06, 2013 4:59 pm

add explosion

Post 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?

User avatar
stilesw
Posts: 1572
Joined: Wed Jun 25, 2014 10:08 pm
Location: Hansville, WA, USA

RE: add explosion

Post 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
“There is no limit to what a man can do so long as he does not care a straw who gets the credit for it.”

Charles Edward Montague, English novelist and essayist
~Disenchantment, ch. 15 (1922)
orca
Posts: 545
Joined: Wed Nov 06, 2013 4:59 pm

RE: add explosion

Post by orca »

Thanks. Adjusting the altitude did the trick.
Post Reply

Return to “Lua Legion”