AddExplosion

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
Parel803
Posts: 941
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

AddExplosion

Post by Parel803 »

Goodmorning, Just a curiosity Question.
I'm trying some stuff with AddExplosion, got damage and flooding on my surface unit.
From there I tried some EMP warheads but saw no differece on my unit. Is that logical and I'm I thinking the wrong way?
with regards Gert-Jan

used:
local unit = ScenEdit_GetUnit({guid='50PVO4-TRMP-U2T2SG'})
ScenEdit_AddExplosion({warheadid=1124, lat=unit.latitude, lon=unit.longitude, altitude=unit.altitude})
Attachments
TstAddExplosion.zip
(9.82 KiB) Downloaded 6 times
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: AddExplosion

Post by KnightHawk75 »

local unit = ScenEdit_GetUnit({guid='50PVO4-TRMP-U2T2SG'})
ScenEdit_AddExplosion({warheadid=1124, lat=unit.latitude, lon=unit.longitude, altitude=(unit.altitude+18.2)})

Using altitude (in this case I think 0) for it causes it to do a Splash Explosion, though that doesn't get recorded for some reason anywhere in the logs which may be intentional or might be an oversight. Use the above to make sure the EMP goes off at least above the water line, I used about 60ft in above example and it seems to work.





Parel803
Posts: 941
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

RE: AddExplosion

Post by Parel803 »

sound easy but I did not think of that
thanks for your time and paticience

regards GJ
Parel803
Posts: 941
Joined: Thu Oct 10, 2019 3:39 pm
Location: Netherlands

RE: AddExplosion

Post by Parel803 »

Not important but love this as a Crow

with regards GJ

Image
Attachments
EMP.jpg
EMP.jpg (366.15 KiB) Viewed 186 times
Post Reply

Return to “Lua Legion”