LUA command for conditional message

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
sarjen
Posts: 115
Joined: Wed Jul 14, 2004 5:10 pm
Contact:

LUA command for conditional message

Post by sarjen »

I have two messages. One message should display if the player destroys a neutral. And one message should show if the OPFOR destroys a neutral. Additionaly the scenario ends instantly.

Have i to use LUA or is there a way with the event editor? I found no condition for a simple if side(NATO) destroys ship A then its message A, if side(OPFOR) destroys ship A then its message B.

Is there an easy way to do that? Thanks in advance.
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: LUA command for conditional message

Post by KnightHawk75 »

Have you tried multiple actions (message and 2nd one end scenario) assigned to the opfor related trigger?

As for LUA...
Trigger (nato related) with lua script action:
ScenEdit_SpecialMessage("theSideName","YourMessageTextherePlainOrInHTML")

Trigger (opfor related) with lua script action:
ScenEdit_SpecialMessage("theSideName","YourOtherMessageTextherePlainOrInHTML");
ScenEdit_EndScenario();

sarjen
Posts: 115
Joined: Wed Jul 14, 2004 5:10 pm
Contact:

RE: LUA command for conditional message

Post by sarjen »

Thanks for the input KnightHawk75. I will do some meddling with LUA.
Post Reply

Return to “Lua Legion”