Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Event activation via script

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Event activation via script Page: [1]
Login
Message << Older Topic   Newer Topic >>
Event activation via script - 1/24/2020 3:35:27 PM   
HorgeTheFlier

 

Posts: 4
Joined: 9/26/2014
From: Italy
Status: offline
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.
Post #: 1
RE: Event activation via script - 1/24/2020 4:16:20 PM   
Randomizer


Posts: 1473
Joined: 6/28/2008
Status: offline
Why not use the "Unit is Destroyed" trigger function?

-C

(in reply to HorgeTheFlier)
Post #: 2
RE: Event activation via script - 1/24/2020 4:25:59 PM   
HorgeTheFlier

 

Posts: 4
Joined: 9/26/2014
From: Italy
Status: offline

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?

(in reply to Randomizer)
Post #: 3
RE: Event activation via script - 1/24/2020 4:50:21 PM   
Randomizer


Posts: 1473
Joined: 6/28/2008
Status: offline
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

(in reply to HorgeTheFlier)
Post #: 4
RE: Event activation via script - 1/24/2020 5:49:14 PM   
Sharana


Posts: 343
Joined: 2/3/2016
Status: offline
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.

_____________________________


(in reply to Randomizer)
Post #: 5
RE: Event activation via script - 1/24/2020 6:21:38 PM   
HorgeTheFlier

 

Posts: 4
Joined: 9/26/2014
From: Italy
Status: offline
Sorry my English, I try to explain myself better.
I would like to know only the command string to make a certain event trigger.

(in reply to Sharana)
Post #: 6
RE: Event activation via script - 1/24/2020 10:48:06 PM   
Sharana


Posts: 343
Joined: 2/3/2016
Status: offline
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?

< Message edited by Sharana -- 1/24/2020 10:50:22 PM >


_____________________________


(in reply to HorgeTheFlier)
Post #: 7
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Event activation via script Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

1.781