Hi there!
So, I tried to make a trigger that when every x seconds passes, it has a 33% chance that an event will happen. To acheive that, I tried using a random integer number between 1 and 3. After that, if the chance for a random event hits, it again picks a random number (this time between 1 and 2) to specify which event will take place - or at least that's what I was hoping to achieve. The trigger fires off only once, while it should loop after the right number (in this case, it is 1) for an event isn't picked. I feel like this should be easy to do and yet, something is definitely wrong and I am not sure what. I will appreciate any help.
Here are the triggers themselves:
Thanks in advance!
So, I tried to make a trigger that when every x seconds passes, it has a 33% chance that an event will happen. To acheive that, I tried using a random integer number between 1 and 3. After that, if the chance for a random event hits, it again picks a random number (this time between 1 and 2) to specify which event will take place - or at least that's what I was hoping to achieve. The trigger fires off only once, while it should loop after the right number (in this case, it is 1) for an event isn't picked. I feel like this should be easy to do and yet, something is definitely wrong and I am not sure what. I will appreciate any help.
Here are the triggers themselves:
-
EventsLoop
-
Events
-
Time - Every 5.00 seconds of game time
-
-
Conditions
-
Actions
-
Trigger - Run EmitRandomEvent <gen> (checking conditions)
-
Trigger - Turn off (This trigger) \\ -------------> I want this trigger to be turned off after it fires, so there wouldn't be two events taking place at the same time
-
-
-
EmitRandomEvent
-
Events
-
Conditions
-
Actions
-
Set RandomEventInteger = (Random integer number between 1 and 3)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
RandomEventInteger Equal to 1
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Then - Actions
-
Set RandomEventInteger = (Random integer number between 1 and 2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
RandomEventInteger Equal to 1
-
-
Then - Actions
-
Trigger - Turn on CaravanSpawn <gen>
-
Trigger - Run CaravanSpawn <gen> (checking conditions)
-
Trigger - Turn off EventsLoop <gen>
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
RandomEventInteger Equal to 2
-
-
Then - Actions
-
Trigger - Run OrcWarbandSpawn <gen> (checking conditions)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Else - Actions
-
Trigger - Turn on EventsLoop <gen> \\ ------------> This was supposed to make it loop when the random integer number draws either 2 or 3
-
-
-
-
Thanks in advance!
Last edited: