Page 1 of 1
Event activation via script
Posted: Fri Jan 24, 2020 1:35 pm
by HorgeTheFlier
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.
RE: Event activation via script
Posted: Fri Jan 24, 2020 2:16 pm
by Randomizer
Why not use the "Unit is Destroyed" trigger function?
-C
RE: Event activation via script
Posted: Fri Jan 24, 2020 2:25 pm
by HorgeTheFlier
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?
RE: Event activation via script
Posted: Fri Jan 24, 2020 2:50 pm
by Randomizer
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
RE: Event activation via script
Posted: Fri Jan 24, 2020 3:49 pm
by Sharana
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.
RE: Event activation via script
Posted: Fri Jan 24, 2020 4:21 pm
by HorgeTheFlier
Sorry my English, I try to explain myself better.
I would like to know only the command string to make a certain event trigger.
RE: Event activation via script
Posted: Fri Jan 24, 2020 8:48 pm
by Sharana
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?