Lua: Added weapon causing damage to Event_Damaged/Destroyed
Posted: Fri Sep 13, 2019 10:03 am
Hi folks,
No way i can figure out what's the way i can use this in a Lua script. It's not part of UnitX() - which is the damaged/destroyed unit triggering the event, nor is it related to UnitY() or UnitC()- which are both fields related to other kind of trigger ("Unit Detected" actually).
Specifically, what i'd want is to Lua-code an Action changing the posture of the damaged/destroyed unit's Side towards the Weapon-Causing-the-Damage/Destruction's Side.
i.e. If one land unit from the side "DPRK" is damaged or destroyed by a weapon from the side "US" (with the US side conducting a first / preemptive strike), so the posture of the "DPRK" side should then change to "H" (Hostile") vs. the side "US".
Thanks a lot in advance.
Best regards!!
Fernando.
No way i can figure out what's the way i can use this in a Lua script. It's not part of UnitX() - which is the damaged/destroyed unit triggering the event, nor is it related to UnitY() or UnitC()- which are both fields related to other kind of trigger ("Unit Detected" actually).
Specifically, what i'd want is to Lua-code an Action changing the posture of the damaged/destroyed unit's Side towards the Weapon-Causing-the-Damage/Destruction's Side.
i.e. If one land unit from the side "DPRK" is damaged or destroyed by a weapon from the side "US" (with the US side conducting a first / preemptive strike), so the posture of the "DPRK" side should then change to "H" (Hostile") vs. the side "US".
Thanks a lot in advance.
Best regards!!
Fernando.