Unit destroyed by (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion



Message


nogravity -> Unit destroyed by (12/18/2021 11:21:22 PM)

Is it possible to find out the side that destroyed an unit in Lua functions? Currently, the Command trigger get fired when an unit is damaged or destroyed but I cannot find a way to tell which side destroy or damage the unit. Is there a way?




musurca -> RE: Unit destroyed by (12/20/2021 4:35:13 AM)

This was just recently discussed here: http://www.matrixgames.com/forums/fb.asp?m=5101348

Short version: with many caveats, calling ScenEdit_UnitY() from a script after a damaged/destroyed trigger will USUALLY give you the weapon that destroyed it as a Unit. You can get the side from that Unit's wrapper.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
2.21875