Activate/Inactivate Events

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
User avatar
kevinkins
Posts: 2465
Joined: Wed Mar 08, 2006 11:54 am

Activate/Inactivate Events

Post by kevinkins »

I looked through the lua documentation, but nothing jumps out at me. Is there lua code to turn events on and off based on another trigger e.g. an a/c entering a certain area or a random number generated.

Thanks

Kevin
“The study of history lies at the foundation of all sound military conclusions and practice.”
Alfred Thayer Mahan
Cik
Posts: 671
Joined: Wed Oct 05, 2016 3:22 am

RE: Activate/Inactivate Events

Post by Cik »

ye, use setevent with IsActive (boolean so 1/0)

ScenEdit_SetEvent('testname', {Isactive=1})

tested it to be sure, works fine.

there's also setaction settrigger and setcondition as well which are pretty similar.

User avatar
kevinkins
Posts: 2465
Joined: Wed Mar 08, 2006 11:54 am

RE: Activate/Inactivate Events

Post by kevinkins »

Thanks .. will try now.

Kevin
“The study of history lies at the foundation of all sound military conclusions and practice.”
Alfred Thayer Mahan
User avatar
kevinkins
Posts: 2465
Joined: Wed Mar 08, 2006 11:54 am

RE: Activate/Inactivate Events

Post by kevinkins »

Perfect, that's the one. Thanks again.

Kevin
“The study of history lies at the foundation of all sound military conclusions and practice.”
Alfred Thayer Mahan
Post Reply

Return to “Lua Legion”