HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Alliance

12-07-2002, 04:14 PM#1
Guest
I've spent HOURS(ok maybe not, but a really long time) trying to make a trigger that will make allies of a player treat each other as allies but none of them doesnt seem to work...

So, I ask...
12-07-2002, 04:57 PM#2
Guest
What's wrong with...

Player - Treat Player as Ally

That even works with computers.
12-08-2002, 01:20 AM#3
Guest
my triggers structure is something like this...

For each IntegerA from 1 to 4 do
For each IntergerB from 5 to 12 do
If Player(IntegerB) is allied to Player(IntegerA) Then
Pick every player in (Allies of Player(IntegerA) and make
Player(IntegerB) treat (picked player) as an ally with
shared vision
Else
do nothing

nothing wrong with it right???
12-08-2002, 01:24 AM#4
Electromancer
Whos the picked player? It needs to be defined in a "pick every player in (group) and do" mode. That shouldnt be too hard.
12-08-2002, 02:05 AM#5
Guest
For each IntegerA from 1 to 4 do
For each IntergerB from 5 to 12 do
If Player(IntegerB) is allied to Player(IntegerA) = True Then
Pick every player in (Allies of Player(IntegerA) and make
Player(IntegerB) treat (picked player) as an ally with
shared vision
Else
do nothing

the player is picked at line 4, allies of Player(IntegerA)
12-08-2002, 02:08 AM#6
Guest
I've found that this works for me:

Before calling this trigger you place the player that you want to ally with the player group goodguys in the variable tempPlayerVar. Then you call this trigger. You can make similar triggers to unally a player with other players, or to give unit control, etc. After you are finished allying the player with the rest of goodguys you can add him to the group.

Player Group - Pick every player in goodguys and do (Player - Make (Picked player) treat tempPlayerVar as an Ally with shared vision)
Player Group - Pick every player in goodguys and do (Player - Make tempPlayerVar treat (Picked player) as an Ally with shared vision)


If you do use this method to unally a player with a player group make sure that he isn't in the group when the trigger is called, otherwise he will be unallied with himself, and he'll lose unit control.