Staredit Network

Staredit Network -> UMS Assistance -> give units equally
Report, edit, etc...Posted by Urmom(U) on 2004-10-17 at 11:17:44
ok im making an offence/Defence type of a map and at the start of each level each player will be given a certain amount of units from a neutral player. the question is if say player 5 wasnt in the game how would i equally give the units hed revieve to his teamates?
Report, edit, etc...Posted by LegacyWeapon on 2004-10-17 at 11:30:13
make the units for a comp then split it up evenly?

like if the comp still has that many units left after giving each player his/her share, then make it give out hte rest by like turns

Give p1
p2
p3
etc
Report, edit, etc...Posted by SaLaCiouS(U) on 2004-10-17 at 15:06:25
After it gives all of them to the players that are there, have it give one unit to P1, then one unit to P2, etc. Repeat until there are no units left belonging to the neutral player.
Report, edit, etc...Posted by Crispie on 2004-10-17 at 15:11:01
I would say do this...have a small section where you have 1 civilian for each player preplaced there, and when the game starts all the players that have joined have a trigger that specifys a certain switch pending on what players civilians there (only the players that joined the game will have civs there), and this switch is required in use of giving units to players. As for is someone leaves, I know that Turret D somehow detects when a player leaves, but this time instead of when the person leaves giving all the units to other players, you can have it where it changes the switch that tells all the triggers which players are in game. I hope this vague response somewhat helps.


Example -

Switches,
Switch 1 ON
Switch 2 ON
Switch 3 ON
Switch 4 ON
Switch 5 ON
Switch 6 ON

When...
Player 1 in game
Player 2 in game
Player 3 in game
Player 4 in game
Player 5 in game
Player 6 in game
Player 7 in game
Player 8 in game


Next is...

Switches,
Switch 1 ON
Switch 2 ON
Switch 3 ON
Switch 4 ON
Switch 5 ON
Switch 6 OFF

When...
Player 1 not in game
Player 2 in game
Player 3 in game
Player 4 in game
Player 5 in game
Player 6 in game
Player 7 in game
Player 8 in game

etc, and then for example....


CONDITIONS
When Switch 1 ON
When Switch 2 ON
When Switch 3 ON
When Switch 4 ON
When Switch 5 ON
When Switch 6 OFF
(Also put in any other conditions here)

ACTIONS
Give units from Player 12 to Player 2
Give units from Player 12 to Player 3
Give units from Player 12 to Player 4
Give units from Player 12 to Player 5
Give units from Player 12 to Player 6
Give units from Player 12 to Player 7
Give units from Player 12 to Player 8
(Also put in any other actions here)
Preserve Trigger
Report, edit, etc...Posted by Mini Moose 2707 on 2004-10-17 at 15:13:24
What a horrible waste of switches. A crime against triggering itself.

If each player owns the trigger and has it give ONE unit to Current Player, it will work fine.
Report, edit, etc...Posted by Urmom(U) on 2004-10-17 at 17:59:44
ok thanks mini moose but one last part in that, how can i detect if the player is missing. i might decide to just have them randomly assorted instead of having preplaced units.
Report, edit, etc...Posted by RexyRex on 2004-10-17 at 21:01:04
P12 Commands one men.
Give 1 men owned by P12 to Force 1.
Report, edit, etc...Posted by Paella on 2004-10-19 at 08:58:26
To detect if a player is missing make a trigger owned by the force and have it detect if player one brings no unit to a location (if player one was not there at the beginning of the game, then the trigger will activate just as it will when he/she leaves the game.)
Report, edit, etc...Posted by Urmom(U) on 2004-10-19 at 14:57:24
ok everyone im going to go test this out and if it doesnt work then ill re post but for now i think its fine. before i was using give units to force1 because i thought it would give them out equally but i guess not(i did the force1 in starforge)
Report, edit, etc...Posted by Staredit.Net Essence on 2004-10-19 at 16:15:55
If a player leaves, the buildings will automatically be given to player 12 so you don't need to detect the player is missing.

If the player was not there at the beginning of the game, then they will never be there. The player must be there and then leave.

I have been having trouble with p12 triggers like this. I find that in my maps if I have it give or destroy all neurtal units, it does it as the game starts to all units. it treats everything as neutral when it starts. I find I need a wait in first to make it work right. Does anyone else have this problem?
Report, edit, etc...Posted by Crispie on 2004-10-19 at 16:19:56
wait if the buildings are given to P12, how come people who were enemys of the players whos buildings are given to p12 still attack P12's new buildings?
Report, edit, etc...Posted by Urmom(U) on 2004-10-19 at 16:43:41
dont worry guys i fixed the problems and its awsome now. you can close this now.
Report, edit, etc...Posted by RexyRex on 2004-10-19 at 18:45:22
Problem solved, someone lock this.
But....if you want to distribute units faster, use a hyper, or give all of 12 to a player then set a counter or a switch saying "P1 got units, let P2 have some."
Do you get what that is supposed to do?
Report, edit, etc...Posted by Urmom(U) on 2004-10-19 at 20:55:17
yes i have hypers and it works perfectly now and i dont think i would need to add your other trigger but thanks anyways
Next Page (1)