Lua: Added weapon causing damage to Event_Damaged/Destroyed

Post bug reports and ask for game support here.

Moderator: MOD_Command

Post Reply
Fer_Cabo
Posts: 111
Joined: Thu Sep 17, 2015 2:39 pm

Lua: Added weapon causing damage to Event_Damaged/Destroyed

Post by Fer_Cabo »

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.
Post Reply

Return to “Tech Support”