Jump to content

Explode a dynamically spawned unit.


tn_prvteye

Recommended Posts

I'm trying to explode (not just remove) a dynamically spawned unit. Is this possible? I've got a script that will spawn a vehicle with MIST in a random zone, then send it to another random zone. I need it to explode at some point along the way. I can't use the ME 'explode' option since the Unit isn't created until after mission start. Any ideas?

Link to comment
Share on other sites

If you know the name of the unit, or know roughly where it is you can use trigger.action.explosion.

 

For example.

 

local pos = Unit.getByName('whatever'):getPoint()

trigger.action.explosion(pos, 500)

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

I tried that, but couldn't get it to work. I'm using MIST and I tried the Unit Name I assigned it, but no kaboom. I think I found another way to achieve what I'm looking for, though. Thanks for the quick response...I'll keep fiddling with it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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