Event activation via script (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series



Message


HorgeTheFlier -> Event activation via script (1/24/2020 3:35:27 PM)

Hi everyone, I'm having trouble with an event trigger script.

I would like an action to trigger an event upon the death of a specific unit, how can I do it via LUA?

Thanks in advance.




Randomizer -> RE: Event activation via script (1/24/2020 4:16:20 PM)

Why not use the "Unit is Destroyed" trigger function?

-C




HorgeTheFlier -> RE: Event activation via script (1/24/2020 4:25:59 PM)


quote:

ORIGINAL: Randomizer

Why not use the "Unit is Destroyed" trigger function?

-C


yes I used it, but then how do I activate with an action an event that at the beginning of the scenario is deactivated?




Randomizer -> RE: Event activation via script (1/24/2020 4:50:21 PM)

I do not understand what you're trying to do. You can use Lua to activate an event but destroying a unit when the scenario loads seems an odd approach without seeing what you are trying to achieve. You might do better posting the scenario in the Lua Legion forum here:Lua Legion

-C




Sharana -> RE: Event activation via script (1/24/2020 5:49:14 PM)

It's possible to kill unit with LUA and to activate/deactivate events, but you should describe exactly what are you trying to do in order to get LUA examples.




HorgeTheFlier -> RE: Event activation via script (1/24/2020 6:21:38 PM)

Sorry my English, I try to explain myself better.
I would like to know only the command string to make a certain event trigger.




Sharana -> RE: Event activation via script (1/24/2020 10:48:06 PM)

ScenEdit_SetEvent('Event Name',{isactive=true})

This will make specific event active (if it is disabled on loading as you say). Is that what you need?




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.3125