Jump to content

Using Random trigger for running LUA scripts


tn_prvteye

Recommended Posts

I need to set up triggers so that a random LUA script is run from a choice of four, and ONLY one is run. I got this from the Hoggit site (and yes this for a group, but I'm assuming I can do the same for script activation):

 

Single Choice from List

Once > Random 5% AND Flag 1 is False > Activate Group 1 AND Set Flag 1 True

Once > Random 5% AND Flag 1 is False > Activate Group 2 AND Set Flag 1 True

Once > Random 5% AND Flag 1 is False > Activate Group n AND Set Flag 1 True

 

Am I understanding correctly that there's a 5% chance the 1st Group will be activated, then 5% for the next and so on...until one is chosen down the list and sets the flag to true (this stopping any further activation)?

 

Now, since it's set up as "Once", there's a 95% chance nothing will happen each time. So since my list is rather short (only four scripts), there's a good chance that nothing will be run? Is there a way to make sure at least ONE is activated randomly and that's it?

 

I hope I'm making sense, I'm still new to triggers and mission building.

Link to comment
Share on other sites

Yeah, there's only four triggers, and it's just me running it as an SP mission. :D

 

tn_prnteye,

 

An open question, can you code? I mean, you have programming experience?

There are alternatives when it gets complicated.

 

FC

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...