
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Generally you NEVER should give units to a specific human player (e.g. Player 1) because when you do when the player is absent the units are still given to the so called ghost player.
What I meant with this is that they are given to Player 1, which is called a ghost player when he's not here.
But why not
[Human Force 1]
C: P12 brings at least 1 "I'm here" to 'check P1-3'
A: Create 2 drones at 'X' for Current Player
I don't know your condition to detect P1 leaving, but this is what I would do because it's 1 trigger that detects any leaver of Force 1.
And the action implicitly just creates units for active players. Still works when a 2nd player in that force leaves.
The clean-up trigger would look like this:
P8 (Computer)
C: P12 brings at least 1 "I'm here" to 'check P1-3'
A: Remove all [any unit] for P12
This trigger also cleans up for Force 2 leavers. The important thing is that it's owned the last Player slot and that he's always there.
If for example, P3 was not playing, I would destroy the units for P3. So I was wondering, if P3 was absent, and 2 Drone were created for P3 at location X, if the units would be created for P11 or Neutral...or whomever. If so, I would simply remove Drones owned by Neutral Player at location X.
Again, NEVER create units for specific players. You're just asking for bugs and messes.
Do it like this:
[Human Force 1]
C: Always
A: Center 'create' on [buildings] owned by Current Player
A: create 2 Drones at 'create' for Current Player
A: create 1 "I'm here" at 'check P1-3'
1 Trigger for 3 players and no bugs or wrongly created units or whatever. Just clean working and all that thanks to using Current Player.
And if your map starts out blank so you can't center on buildings/units you'll have to split it up, but STILL use Current Player to avoid creating units for ghost players:
Player 1
C: Always
A: create 2 Drones at 'start P1' for Current Player
A: create 1 "I'm here" at 'check P1-3'
Player 2
C: Always
A: create 2 Drones at 'start P2' for Current Player
A: create 1 "I'm here" at 'check P1-3'
Player 3
C: Always
A: create 2 Drones at 'start P3' for Current Player
A: create 1 "I'm here" at 'check P1-3'
Note this is where I create my "checker unit" that reports me when a player leaves (given to P12) in the above trigger.
Post has been edited 1 time(s), last time on Mar 17 2010, 5:17 am by NudeRaider.