View Full Version : Random Trigger?
aki15
12-30-2010, 05:09 PM
How can i make this:
-Time elapsed 41 second.
-Turns Forest/Beach/City Trigger arena?
It should be automatic random mode.
ap0calypse
12-30-2010, 05:41 PM
I don't quite get the "-Turns Forest/Beach/City Trigger arena", so I'll post the base trigger:
Arena
Events
Time - Elapsed game time is 41.00 seconds
Conditions
Actions
Set RanInt = (Random integer number between 1 and 3)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RanInt Equal to 1
Then - Actions
// Forest
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RanInt Equal to 2
Then - Actions
// Beach
Else - Actions
// City
If you mean that the arena should be randomly chosen, then you can either:
- Set a variable to the arena region (if RanInt = 1, set ArenaRegion = Forest <gen>
- Enable/disable triggers (e.g. disable all arena triggers apart from the forest one).
If you meant something else, perhaps you could be more specific?
Another important thing:
Go to File -> Preferences -> Test Map
There, turn OFF "Use Fixed random seed" (if it is enabled, random values will not be random but always the same).
aki15
12-30-2010, 05:51 PM
Hmmm, I don't know how to do it, because in my map i have to turn 2-3 triggers to get arena work...
ap0calypse
12-30-2010, 06:09 PM
Would you mind sending me the map, because I still don't understand what you're trying to say with "turn triggers".
aki15
12-31-2010, 08:59 AM
You can download it, I'm trying to make that for next version. :)
Download (http://www.hiveworkshop.com/forums/maps-564/forsaken-arena-v1-186115/)
ap0calypse
12-31-2010, 10:25 AM
So uhm.
After 41 seconds, a random arena will be chosen... right?
Then you just pick the base trigger I've showed you a few posts ago and add the triggers of the other arena's.
Arena
Events
Time - Elapsed game time is 41.00 seconds
Conditions
Actions
Set RanInt = (Random integer number between 1 and 3)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RanInt Equal to 1
Then - Actions
Actions
Set ChooseOn = True
Set ForestArena = True
Trigger - Turn off City Arena <gen>
Trigger - Turn off Beach Arena <gen>
Trigger - Turn off Forest Arena <gen>
Trigger - Turn on Forest Tele 1 <gen>
Trigger - Turn on Forest Tele 2 <gen>
Set TeleForest = True
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RanInt Equal to 2
Then - Actions
Actions
Set BeachArena = True
Trigger - Turn off City Arena <gen>
Trigger - Turn off Beach Arena <gen>
Trigger - Turn off Forest Arena <gen>
Trigger - Turn on Beach Tele 1 <gen>
Trigger - Turn on Beach Tele 2 <gen>
Set TeleBeach = True
Set ChooseOn = True
Else - Actions
Actions
Set CityArena = True
Trigger - Turn off City Arena <gen>
Trigger - Turn off Beach Arena <gen>
Trigger - Turn off Forest Arena <gen>
Trigger - Turn on City Tele 1 <gen>
Trigger - Turn on City Tele 2 <gen>
Set ChooseOn = True
Note: I've noticed that your triggering isn't good.
Please learn how to remove memory leaks and code more efficiently (loops, if-then-else etc).
If you learn that, the chances that your map gets approved are higher.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.
Search Engine Optimization by
vBSEO 3.5.1 PL2