m sure this has been covered before but I didnt know what to search for
C
Whatever
A
Give X Unit @ 'Wherever' to Player 1
Give X Unit @ 'Wherever' to Player 2
Give X Unit @ 'Wherever' to Player 3
Give X Unit @ 'Wherever' to Player 4
The units are given to some comp even when the trigger is executed and all 4 human players arent in the game. I know the way around it is to use current player but I cant use current player for this trigger.
I solution was to have a separate trigger giving the units owned by this mysterious comp player to some neutral comp, but I dont know what the comp player that owns it is.
Any ideas?
Could you be more specific on what problem you are having?
The way you typed this is sort of confusing. As siegecop up there said you should be more specific.
When Im playing the map alone, and the trigger is executed (that gives units to Player 1, 2, 3, 4 individually) it makes units for 2 3 and 4, even though theyre not in the game. The units arent owned by 2 3 and 4 (obviously), but theyre owned by a hostile comp player.
Better?
Units that are created for nonexistant players are considered "ghost" units. They are hostile to all players, and can not be directly affected by triggers. However, units created for players who leave the game retain their alliances.
That's bad news. Thanks though
Is there ANY way around it?
Howcome you can't use current player for the trigger? If you did then it would solve the problem because a player that isn't there can't run triggers and therefore the units couldnt be given to a hostile computer.
Give to the Force that P1-P4 are in instead of the individual players separately.
Then you can do whatever with the leftovers you previously intended.
Fred is right, see this post if you don't realize why
TOPICQUOTE(Falkoner @ Sep 4 2006, 09:43 AM)
Fred is right, see this post if you don't realize why
TOPIC[right][snapback]555536[/snapback][/right]
That's about trigger order, but this thread starter is just asking about the basic "Give/create units for a player who's not present".
If you explicitly specify a human player to give to/create for, but that player isn't in the game (never joined or left mid-game), the units will still be given/created. This means if you choose "Player 1", "Player 2", etc. However, if you choose the Force that all these players are in, e.g., "Force 1", the trigger action will only give to/create for the players that are in the game. Implicitly the Force does include all its players, but when the trigger executes, it only looks at the ones that are present.
Note: all these above are talking about for which Players the ACTIONS run, not the "Players" section of the trigger overall. If a Player not in the game has triggers under his section, those triggers simply won't run.
Yes, but it does tell you that if you just give it to the force it's the same thing as giving it to those players
Lets say you have 4 human players in force 1, P1-P4.
Create Units for P1, P2, P3, P4. Even if you're playing alone, P2-P4 will own units, as "ghost" player or whatever the heck you want to call them.
Create Units for Force 1. Now, it will only create it for Player 1, since if you have it create for a force, it checks to see which players are in the game.
Many respawns in bound type games use the "create unit for force1" idea. Starcraft Fortress by Blizzard actually utilizes the other way, Create Unit for Player 1, 2, 3.... etc. to have different colored beacons in an all-human player map.
So if you run a trigger:
Player: Player 1
Condition: Always
Action: Create 2 Marine for Force One at Anywhere
Then it'll make 2 marines for player 1, 2 for player 2, 2 for player 3, and 2 for player 4? Or you could also make it for "Force 1" and have the action use "Current Player," and it would have the same effect, right? I also want to understand how this works.
I couldnt use current player because one player would be executing the trigger, and then that trigger would be creating/giving units for player 1-4
You can't give units to forces, but you can create units for forces.
But whatever, I just used a death counter & a separate trigger to create units and I solved my problem.
However, I think I can save a death counter if I use 'Create for Force 1' instead of giving pre-placed units to players 1-4
You can give units to a force. I'm pretty sure I've done it before.
QUOTE(Urmom(U) @ Sep 4 2006, 05:49 PM)
You can give units to a force. I'm pretty sure I've done it before.
[right][snapback]555661[/snapback][/right]
You can't, but you can
create units for a force rather than for the individual players to prevent the creation of units for players that leave.
QUOTE(Lord_Agamemnon @ Sep 4 2006, 04:25 PM)
So if you run a trigger:
Player: Player 1
Condition: Always
Action: Create 2 Marine for Force One at Anywhere
Then it'll make 2 marines for player 1, 2 for player 2, 2 for player 3, and 2 for player 4? Or you could also make it for "Force 1" and have the action use "Current Player," and it would have the same effect, right? I also want to understand how this works.
[right][snapback]555634[/snapback][/right]
The action in that trigger will create 2 marines for each active slot in Force 1 (if there are empty slots in the force, the units won't be created.
If the trigger is running for Force 1 with the action Current Player, it has the same effect but might interface differently with other triggers seeing how it is being run four times rather than once.QUOTE(GoldenKnight @ Sep 4 2006, 09:09 PM)
You can't, but you can create units for a force rather than for the individual players to prevent the creation of units for players that leave.
[right][snapback]555666[/snapback][/right]
Hmm, I thought I remembered in a map I was making a long time ago that I gave the units to a force so that they each got an equal amount of units. Maybe I'm thinking of current player though.