I can haz nukes?

Magma the Great

Chieftain
Joined
Dec 7, 2014
Messages
19
I've been messing around with the firetuner lately, trying to learn Lua/using Lua in mods, and I have a button that I want to summon nuclear explosions on some random tiles. I've got everything except summoning the nuclear explosions (I have it printing "NUKE!" right now), and so far I can't figure out how to summon an explosion/missile on a tile. How would one go about doing this?
I'm using Map.GetPlot(x, y) to put the plots into a local variable if it matters.
 
Untested, but try

Code:
local pUnit = Players[0]:InitUnit(GameInfoTypes.UNIT_NUCLEAR_MISSILE, x, y)
pUnit:PushMission(MissionTypes.MISSION_NUKE, x, y)
 
That would also trigger the fallout, unit destruction and widespread improvement pillaging, right? So it can't be used simply to make the nuke effect from occurring on the tile?
 
Top Bottom