I've been working on a Civilization World type map that is based on the Dungeons and Dragons game. One of the wonders that I have in the scenario gives the owner a random unit every minute or so. Unfortunately, I cannot find the trigger in order to do this. Can anyone explain to me how to make a random unit appear for a player?
None.
You use Switch's Randomize state.
Falkoner's site has a nice
switch tutorial (if you ignore the red and yellow colors
.)
So, as an example I'll use two switches... If you are using more than like 4 switches it would be best to do the binary thingy where you add them all up.
Quick example... This just detects every single possibility.
Collapsable Box
Condition:
- [Whatever will initiate it... DC timer, whatever.]
Actions:
- Set Switch 'Randomize Switch 1'.
- Set Switch 'Randomize Switch 2'.
- Preserve Trigger
Condition:
- [Whatever]
- Switch 1 is cleared
- Switch 2 is cleared
Action
- Create 1 Something as Location Somehwere.
- [Clear condition so this wont loop forever.]
- Preserve
Condition:
- [Whatever]
- Switch 1 is set
- Switch 2 is cleared
Action
- Create 1 Something Else as Location Somehwere.
- [Clear.]
- Preserve
Condition:
- [Whatever]
- Switch 1 is cleared
- Switch 2 is set
Action
- Create 1 Something More as Location Somehwere.
- [Clear.]
- Preserve
Condition:
- [Whatever]
- Switch 1 is set
- Switch 2 is set
Action
- Create 1 Something Less as Location Somehwere.
- [Clear.]
- Preserve
Be careful how many siwtches you use... To figure out the possibilities, do 2
x, where x is the number of switches. 2
1=2 possibilities, 2
2=4 possibilities, 2
3=8, possibilities, 2
4=16, 2
5=32, 2
6=64, etc.
TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB -
topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig -
topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!
You can also use a death count in combination with a switch and just constantly randomize whether or add 1 or not to the death, and then when it's time to pick the unit, you can just decide which unit to pick based on what the death count currently is.
None.
I tried this but I ended up with a player having 5 hero battlecruisers that are supposed to be unique to a wonder. How do I fix this?
Post has been edited 1 time(s), last time on Jul 23 2008, 10:34 pm by BaneOfRome.
None.
It sounds like you didn't rerandomize the switches every time you checked them, so you got the same outcome every time, you have to randomize them each time.
None.
I did randomize them and I got a mixture of units but the problem was with the multiple unique units (instead of one unit every minute, I did one unit every five seconds).
None.
Oh... You may need a system that detects if it's a unique unit, then if it is, it rerandomizes and tries again.
None.
Set a switch at the time when a unit needs to be created, instead of immediately checking the random, then while the switch is set, randomize it, and on the conditions to create the unit, make sure that special unit isn't already out, and make sure the switch is set, and the switches are randomized in the correct combination. If all those conditions are met, create the unit and clear the switch, and have another trigger that randomizes if the switch is still set.
None.