View Full Version : Problem with people leaving ingame.
some_person
05-17-2008, 11:26 AM
I have a problem in my ums map that, when people leave, and a trigger creates units for that player after they have left, they are no longer allied to my units, or for any player that he was previously allied to.
For example, lets say that player 2 left the game. Shortly after, a trigger fires and creates units for player 2. If I, player 1, was originally allied to player 2, then his units would now be attacking any units in sight regardless of the previous alliances.
So the problem I have is:
How can I make spawned units of a player who left the game be re-allied to the players that he was originally allied with?
I've tried to have the player who left to be constantly allied to the other players, but it doesn't seem to work.
SilverCrusader
05-17-2008, 12:27 PM
I'll give you a hint, when players leave a game their things become player 12's.
some_person
05-17-2008, 12:38 PM
I know that, but what I mean is that after the player has left and a trigger creates more units for that player, how can I contoll them?
Or are they also under player 12?
KillerKow
05-17-2008, 12:49 PM
Add a condition in each of the triggers designed to detect whether the player is in the game or not. If they're not in the game, don't create the units.
Durandal
05-17-2008, 12:51 PM
That usually happens when you apply a trigger to an entire force, then in the actions create the units for each individual player. It will continue to create units for the players that left, as specified in the trigger.
The easier way around this is to simply create a different trigger for each player that spawns units, or instead of applying it to a specific force, just checkmark each player that utilizes the trigger.
Or at least, that was my problem a couple of times.
some_person
05-17-2008, 1:19 PM
Actually, I still want the units to spawn for the player that left, I just want to have them be allied to everyone he was allied to before. I guess the title was a bit misleading.
Durandal
05-21-2008, 3:51 PM
Have you tried running an ally script on a preserve trigger?
I don't see why you'd want his units to continue to spawn after he leaves, since I don't think they retain their original functions (I don't really know how that stuff works, it's really weird).
some_person
05-21-2008, 7:24 PM
Ok, when I run the ai script, "Set player to ally here," how do I choose which player I want to ally?
If I were to have the trigger under player 2, would that mean that he is allying himself? Or does it work differently?
Also, the reason I want the units to still spawn is so that I can give the units to other players, but I need the units to allied to everyone so that they don't attack other units before they are given to the other players.
Durandal
05-21-2008, 9:28 PM
Don't use the AI script, just use the action called "Set alliance status".
some_person
05-21-2008, 9:49 PM
Yeah, I've already tried that. Thats what I ment by trying to constantly ally the player to the other players.
I tried to ally them to the whole force and each player seperatley, but it doesn't work. I'm guessing it's because after the player leaves, the control of the player changes or something.
I've tried to have player 2 constantly setting alliance to the other players, but it doesn't work.
Edit: does anyone know what player controls the player's units after the player has left and units still spawn for them?
Durandal
05-21-2008, 9:57 PM
That's what confuses me; I think it's still the same player, somehow.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.