[Q] Lua trigger for change of posture - help

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
Knightpawn
Posts: 661
Joined: Mon Dec 02, 2024 12:28 pm

[Q] Lua trigger for change of posture - help

Post by Knightpawn »

I want to create an event where the action is 'Change Mission Status' and the trigger is side A becoming Hostile (it is unfriendly at start). I don't see an ready trigger for that nor an option to "lua script" a trigger. How would you do it?
Is it 'Scenario is loaded' as a trigger for an event and then in the lua script of the action that event one sets the above as a 'hidden event' ?
Nikel
Posts: 3233
Joined: Tue Mar 24, 2009 10:51 am

Re: [Q] Lua trigger for change of posture - help

Post by Nikel »

Why side A becomes hostile?
Knightpawn
Posts: 661
Joined: Mon Dec 02, 2024 12:28 pm

Re: [Q] Lua trigger for change of posture - help

Post by Knightpawn »

Because side A is player and he chooses the time to attack. (Player side becomes hostile for the computer player). Until then each side treats the other as unfriendly
Nikel
Posts: 3233
Joined: Tue Mar 24, 2009 10:51 am

Re: [Q] Lua trigger for change of posture - help

Post by Nikel »

If the player is attacking, then is damaging or destroying the computer side units.

Those are valid triggers.
Knightpawn
Posts: 661
Joined: Mon Dec 02, 2024 12:28 pm

Re: [Q] Lua trigger for change of posture - help

Post by Knightpawn »

Nikel wrote: Tue Apr 07, 2026 11:27 am If the player is attacking, then is damaging or destroying the computer side units.

Those are valid triggers.
You are right!
Post Reply

Return to “Lua Legion”