I am working on Team Micro Work 4 and have run into a problem. In Team Micro Work 3 it was made so when the first round began it was like this.
PLAYERS
Player 8
CONDITIONS:
Player 8 accumulates exactly 1 gas
ACTIONS
Wait for 5000 milliseconds
Create 1 Marine for Player 1 at location X
Create 1 Marine for Player 2 at location X
Create 1 Marine for Player 3 at location X
Create 1 Marine for Player 4 at location X
Create 1 Marine for Player 5 at location X
Create 1 Marine for Player 6 at location X
Create 1 Archon for Player 7 at location X
If a player left the game, it created a unit for the player who left....however the unit would be controlled by a computer and not do anything.
In my sequal I wanted it to be randomly distributed to players who are in the game. For example if only 2 players join the game out of 6, I wanted it to give the 4 missing marines to the 2 players who are in the game. How would i make it either randomly distributed or evenly distributed among the players who are in the game. This should apply also if a player leaves the game.
None.
You'd have to make a Trigger for Each Player thaty Assimilates the Missing person.
Such as on my map, When player ? controlls nothing I set up a trigger that Set Switches that allowed it to over-go it.
Player 1 Controls 0 Units Anywhere
-------------------------------------------------
Set Switch 1
Wait 1 Mili
[Comment]
Switch 1 is Set
------------------------------------------------
Create [Whatever] for [Player] at [Where-ever]
Continue doing this until all players are Covered.
None.
Preplace an unit for every player like a flag or something. The players who own a flag will be the players currently in game.
We'll create all the marines for P12 then equally give them to the current ingame players.
Players:
- Player 8
Conditions:
- Whatever
Actions:
- Create 6 marine for P8 at loc
- Give all the marines owned by P8 at loc to P12
- Preserve trigger
Now we'll give the P12 marines equally to every player. To do so we'll use a deathcounter to keep track to what player we'll give the next unit. We'll only give units to the players that own flags.
Players:
- Player 8
Conditions:
- P12 commands atleast 1 marine
- P8 has exactly 0 deaths of Unused Unit
- P1 commands atleast 1 flag
Actions
- Give 1 marine owned by P12 to P1
- Modify deaths for Unused Unit for P8: add 1
- Preserve trigger
... (the same for P2..P5)
Players:
- Player 8
Conditions:
- P12 commands atleast 1 marine
- P8 has exactly 5 deaths of Unused Unit
- P6 commands atleast 1 flag
Actions
- Give 1 marine owned by P12 to P6
- Modify deaths for Unused Unit for P8: set to 0
- Preserve trigger
Players:
- Player 8
Conditions:
- P12 commands atleast 1 marine
- P8 has exactly 0 deaths of Unused Unit
- P1 commands exactly 0 flag
Actions
- Modify deaths for Unused Unit for P8: add 1
- Preserve trigger
... (the same for P2..P5)
Players:
- Player 8
Conditions:
- P12 commands atleast 1 marine
- P8 has exactly 5 deaths of Unused Unit
- P6 commands exactly 0 flag
Actions
- Modify deaths for Unused Unit for P8: set to 0
- Preserve trigger
That should do the trick, and it'll also work if a player leaves
EDIT: Actually you'll need to remove all the flags for P12. Add this trigger on top of those ones:
Players:
- Player 8
Conditions:
- Always
Actions:
- Remove all flags for P12
- Preserve trigger
Post has been edited 3 time(s), last time on Jun 12 2008, 9:23 pm by Clokr_.
?????
Can't you set it up like this?
For Player 8:
c: player 8 has gas
a: wait 5000
add 1 DC to all other players
For other players (individually):
c: suffered 1 of DC
a: create unit at location X, set DC to 0
None.
I believe he wants 6 marines created regardless how many players are in game, then he wants them to be distributed equally for every player. The same with the marines owned by a player when they leave the game.
Modified my method a bit, I didn't realize that the original trigger only creates marines for 6 human players.
?????
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
All of the above should work but it can be done much simpler:
Create the units for a computer player and make this trigger:
Force 1
*)Conditions:
<any you see fit>
Actions:
Give 1 [men] from <comp player> to Current Player
Preserve trigger
*) Assuming the player Force is Force 1. If the Players are spread among multiple forces make 1 trigger for each Force.
Lower player numbers will have "first strike" when there are not enough units for all present players.
You might want to combine the above method with what Clokr_ suggested. Give the comp units to P12 and give from P12 instead. This has the advantage that you can control better which units are given and units from leavers are also given.
Oh, I didn't read the first post carefully enough. For equal distribution, NudeRaider has the simplest method
None.
He really doesn't. If player 7 has 3 marines and leaves then player 6 has 3 marines and leaves my method ensures that the rest of players will recive marines almost equally. But with nuderaider's P1, P2 and P3 would recibe all the marines while P4 and P5 would recive none.
?????
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
He really doesn't. If player 7 has 3 marines and leaves then player 6 has 3 marines and leaves my method ensures that the rest of players will recive marines almost equally. But with nuderaider's P1, P2 and P3 would recibe all the marines while P4 and P5 would recive none.
My method works well in the beginning and if a leaver had many units.
Whereas you need to use Clokr_'s method if leavers leave only a few (1-5) units behind.