Probably something silly I'm missing, but I would really like to fix this and I could use some help.
Basically, what I'm trying to do is take collection of units owned by a leaving player, put them under the control of another specific player, and then change the unit type of the unit.
Again, it's supposed to put the unit type of Zombie (Produceable) into a unit group called TempGroup. From there, it should be taking the units in TempGroup and putting them under the control of Player 9 (Gray) and then replace the just transferred units with just the unit type of Zombie.
This trigger isn't even changing the units over to Player 9's (Gray) control and I'm not sure if it's changing there unit type or not, I'm going to guess no (both models look the same, produceable cost no food)
Any idea what the problem may be? The units that need to be transferred that are the Zombie (Produceable) are most certainly called that and are the ones that the leaving player can only have and create.
Thanks.
Basically, what I'm trying to do is take collection of units owned by a leaving player, put them under the control of another specific player, and then change the unit type of the unit.
Trigger:
- Leaver
- Events
- Player - Player 1 (Red) leaves the game
- Player - Player 2 (Blue) leaves the game
- Player - Player 3 (Teal) leaves the game
- Player - Player 4 (Purple) leaves the game
- Player - Player 5 (Yellow) leaves the game
- Player - Player 6 (Orange) leaves the game
- Player - Player 7 (Green) leaves the game
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Triggering player) is in Human_Players) Equal to True
- Then - Actions
- Player Group - Pick every player in (All players) and do (Player - Add -1 to (Picked player) Current lumber)
- Else - Actions
- If - Conditions
- Game - Display to (All players) the text: ((Name of (Triggering player)) + has left the game.)
- Player Group - Remove (Triggering player) from Human_Players
- Player Group - Remove (Triggering player) from Towns_People
- Player Group - Remove (Triggering player) from Zombies
- Player Group - Make (Player group((Triggering player))) treat Towns_People as an Enemy
- Player Group - Make (Player group((Triggering player))) treat Zombies as an Enemy
- Set TempGroup = (Units owned by (Triggering player) of type Zombie (Produceable))
- Unit Group - Pick every unit in TempGroup and do (Actions)
- Loop - Actions
- Unit - Change ownership of (Picked unit) to Player 9 (Gray) and Change color
- Unit - Replace (Picked unit) with a Zombie using The old unit's relative life and mana
- Loop - Actions
- Custom script: call DestroyGroup (udg_TempGroup)
- Unit Group - Pick every unit in TempGroup and do (Actions)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Again, it's supposed to put the unit type of Zombie (Produceable) into a unit group called TempGroup. From there, it should be taking the units in TempGroup and putting them under the control of Player 9 (Gray) and then replace the just transferred units with just the unit type of Zombie.
This trigger isn't even changing the units over to Player 9's (Gray) control and I'm not sure if it's changing there unit type or not, I'm going to guess no (both models look the same, produceable cost no food)
Any idea what the problem may be? The units that need to be transferred that are the Zombie (Produceable) are most certainly called that and are the ones that the leaving player can only have and create.
Thanks.