- Joined
- Aug 1, 2007
- Messages
- 535
Ok in my map I have a whole bunch of towns that some randomly upgrade to villages and some of those villages upgrade into cities.
Problem is the same cities upgrade each and every time. Why are my random triggers not bringing random results?!
Also I have triggers that choose a random player and makes him bad, and then it creates the base units for all players that are playing, problem is it creates units for players who arent playing, and I dont know if it chooses a random start location at the beggining of the map though,
Here are the triggers for that
Problem is the same cities upgrade each and every time. Why are my random triggers not bringing random results?!
-
Town Upgrades
-
Events
- Map initialization
- Conditions
-
Actions
- Set Towns = (Units of type Town)
-
For each (Integer A) from 1 to ((Number of units in Towns) / 2), do (Actions)
-
Loop - Actions
- Unit Group - Add (Random unit from Towns) to Villages
-
Unit Group - Pick every unit in Villages and do (Actions)
-
Loop - Actions
- Unit Group - Remove (Picked unit) from Towns
-
Loop - Actions
-
Loop - Actions
-
For each (Integer B) from 1 to ((Number of units in Villages) / 2), do (Actions)
-
Loop - Actions
- Unit Group - Add (Random unit from Villages) to Citys
-
Unit Group - Pick every unit in Citys and do (Actions)
-
Loop - Actions
- Unit Group - Remove (Picked unit) from Villages
-
Loop - Actions
-
Loop - Actions
-
Unit Group - Pick every unit in Citys and do (Actions)
-
Loop - Actions
- Unit - Replace (Picked unit) with a City using The old unit's relative life and mana
- Unit - Set level of Gold Mine ability plus for (Picked unit) to 3
- Neutral Building - Add 12500 gold to (Picked unit)
- Neutral Building - Add 12500 gold to (Picked unit)
-
Loop - Actions
-
Unit Group - Pick every unit in Villages and do (Actions)
-
Loop - Actions
- Unit - Replace (Picked unit) with a Village using The old unit's relative life and mana
- Unit - Set level of Gold Mine ability plus for (Picked unit) to 2
- Neutral Building - Add 12500 gold to (Picked unit)
-
Loop - Actions
-
Events
Also I have triggers that choose a random player and makes him bad, and then it creates the base units for all players that are playing, problem is it creates units for players who arent playing, and I dont know if it chooses a random start location at the beggining of the map though,
Here are the triggers for that
-
RuntBad
- Events
- Conditions
-
Actions
-
Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
-
Loop - Actions
- Player Group - Add (Picked player) to Good
-
For each (Integer A) from 1 to 10, do (Actions)
-
Loop - Actions
- Player - Make (Picked player) treat (Player((Integer A))) as an Ally
-
Loop - Actions
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of players in Good) Greater than 2
-
Then - Actions
- Player Group - Add (Random player from Good) to Bad
-
Player Group - Pick every player in Bad and do (Actions)
-
Loop - Actions
- Player Group - Remove (Picked player) from Good
-
Loop - Actions
- Else - Actions
-
If - Conditions
- Game - Display to Good the text: You are |cff00ff00g...
- Game - Display to Bad the text: You are |cffff0000b...
-
Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
-
Loop - Actions
- Unit - Create 1 Camp for (Picked player) at ((Picked player) start location) facing Default building facing degrees
- Unit - Create 3 Worker for (Picked player) at ((Picked player) start location) facing Default building facing degrees
- Unit - Create 2 Spearman for (Picked player) at ((Picked player) start location) facing Default building facing degrees
- Unit - Create 1 Spear Thrower for (Picked player) at ((Picked player) start location) facing Default building facing degrees
-
Loop - Actions
-
Player Group - Pick every player in (All players controlled by a User player) and do (Actions)