Staredit Network

Staredit Network -> UMS Assistance -> nuetral player sharing
Report, edit, etc...Posted by Sickoe_DT_ on 2005-09-16 at 23:26:19
ok im making a defense map.
when someone leaves the game how do i make it so that there units are evenly shared amoungst the human players
Report, edit, etc...Posted by Kumano on 2005-09-17 at 06:37:03
I think they do something like


null
Trigger
Conditions:
¤ Always
Actions:
¤ Give 1 unit from neutral players to Player 1
¤ Give 1 unit from neutral players to Player 2
¤ Give 1 unit from neutral players to Player 3
¤ More of those depending on how many players there are.
¤ Preserve Trigger


But I don't really know, that's just my guess.
Report, edit, etc...Posted by in_a_biskit on 2005-09-17 at 07:01:03
i'm not sure that "neutral players" includes player 12; it might only include players 1-8 who are set to 'neutral' owner. If that's the case, you'll have to put 'player 12' instead.

In addition, if player 1 leaves the game, there's nothing stopping Kumano's trigger from giving units to player 1, which is kind of the opposite of what you want...

So you might instead try:
Trigger
Players:
¤ All human players
Conditions:
¤ Player 12 commands at least 1 men
Actions:
¤ Give 1 men owned by player 12 to current player.
¤ Preserve trigger
Which will only give units to players in the game.

edit: added "Preserve trigger"
Report, edit, etc...Posted by PCFredZ on 2005-09-17 at 09:29:13
QUOTE(in_a_biskit @ Sep 17 2005, 07:00 AM)
i'm not sure that "neutral players" includes player 12; it might only include players 1-8 who are set to 'neutral' owner.  If that's the case, you'll have to put 'player 12' instead.

In addition, if player 1 leaves the game, there's nothing stopping Kumano's trigger from giving units to player 1, which is kind of the opposite of what you want...

So you might instead try:



Trigger
Players:
¤ All human players
Conditions:
¤ Player 12 commands at least 1 men
Actions:
¤ Give 1 men owned by player 12 to current player.
¤ Preserve trigger
Which will only give units to players in the game.

edit: added "Preserve trigger"
[right][snapback]315681[/snapback][/right]

P12 technically is Neutral, but it's best to use IT instead of Neutral Player anyway, so the trigger only checks 1 player.

The P1 leaving scenario described is correct. If you attempt to give it to a nonexistent player while specifying that exact player (instead of the Force that player is in), the unit will be given to a computer-controlled player with the same color as if it was a human player, with alliance status set to Enemy with everyone else.

The trigger example he gave will work. Instead of choosing every single human player, you can also choose the Force that the human players are in; it will also work. The reason that units will be divided evenly is because the trigger will run once for P1, then for P2, and so forth, and then loop back, giving 1 unit to each player evenly. More information on trigger execution orders are available if you want.
Report, edit, etc...Posted by Oo.Turin.oO on 2005-09-17 at 10:42:24
Also i have used nuetral players before, and it instantly killed all units because it read all of them as nuetral (because i was making a type of locks map). So player 12 is alot more specific and alot easier to avoid glitches
Report, edit, etc...Posted by Staredit.Net Essence on 2005-09-20 at 01:29:37
Use a location... Like give them at place B. That way you can still have Nuetral Units elswhere.
Report, edit, etc...Posted by Oo.Turin.oO on 2005-09-20 at 21:55:04
Also if you want everyone to get even amounts of units...an easy way to do it would be...

Conditions:
Always

Actions:
-Move Locations 'give neutrals' on any unit owned by player 12 in 'playing field'
-Give unit at 'give neutrals' owned by player 12 to player 1
-Move Locations 'give neutrals' on any unit owned by player 12 in 'playing field'
-Give unit at 'give neutrals' owned by player 12 to player 2
-Move Locations 'give neutrals' on any unit owned by player 12 in 'playing field'
-Give unit at 'give neutrals' owned by player 12 to player 3
-Move Locations 'give neutrals' on any unit owned by player 12 in 'playing field'
-Give unit at 'give neutrals' owned by player 12 to player 4
ETC FOR AS MANY PLAYERS ARE HUMANS
-preservetrigger

that should work but im sure there is an easier way...i've tried give to force 1 before but it just gives all of them to a random person in force 1...this is my idea
Next Page (1)