- Joined
- Sep 4, 2007
- Messages
- 2,826
Hello! I'm currently working on a conquest system which will allow players to capture each other. Only problem is that when I try to capturing more than one players they won't become allies with each other but only me. How can I fix this?
In other words: I become their ally and they become mine but they don't become each others allies.
Thanks in advance.
In other words: I become their ally and they become mine but they don't become each others allies.
Thanks in advance.
-
Conqure Player
-
Events
- Unit - A unit Is attacked
-
Conditions
-
And - All (Conditions) are true
-
Conditions
- ((Attacked unit) is A town-hall-type unit) Equal to True
- (Life of (Attacked unit)) Less than or equal to ConqureHitpoint
-
Conditions
-
And - All (Conditions) are true
-
Actions
- -------- Restore Townhall --------
- Set Player = (Owner of (Attacked unit))
- Game - Display to (All players) the text: ((MultiboardColor[(Player number of (Owner of (Attacking unit)))] + (Name of (Owner of (Attacking unit)))) + ( |cffffcc99has conqured + (MultiboardColor[(Player number of Player)] + (Name of Player))))
- Unit - Set life of (Attacked unit) to 10000.00
- -------- Captured player unallies his former allies --------
- Set TempPlayerGroup = (All players)
-
Player Group - Pick every player in TempPlayerGroup and do (Actions)
-
Loop - Actions
- Player - Make (Picked player) treat Player as an Enemy
- Player - Make Player treat (Picked player) as an Enemy
- Player - Make Player 12 (Brown) treat Player as an Ally with shared vision
-
Loop - Actions
- Custom script: call DestroyForce(udg_TempPlayerGroup)
- -------- Ally with conquering player group --------
- Set TempPlayerGroup = (Player group((Owner of (Attacking unit))))
-
Player Group - Pick every player in TempPlayerGroup and do (Actions)
-
Loop - Actions
- Player - Make (Picked player) treat Player as an Ally with shared vision
- Player - Make Player treat (Picked player) as an Ally with shared vision
- Player - Change color of Player to (Color of (Owner of (Attacking unit))), Changing color of existing units
-
Loop - Actions
- Custom script: call DestroyForce(udg_TempPlayerGroup)
-
Events