Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] "Open" player slots alliance status
[SOLVED] "Open" player slots alliance status
This topic is locked. You can no longer write replies here.
Jan 9 2012, 4:11 am
By: sraw531  

Jan 9 2012, 4:11 am sraw531 Post #1



So I recently had this problem. Its a 2v2v2v2 map, and its meant to be played with both players in a team, however in some circumstances you might not have a partner either because hes a douche or you are just going rambo.

The question is, How do you make a player that never was in the game (was an open slot when you started) ally someone else?
For my example, player 1 and player 2 are supposed to be allied all the time (complete with non-backstabbing triggers), yet if player 2 was never in the game, anytime he has units made for him he is hostile to player 1. Since the alliance triggers are targeting them specifically, player 1 allies player 2 just fine.

Note: I do have "Allied", "Allied Victory", and "Share Vision" done in the force options (But not random location, because I like presetting colors)
Also, The units when they are given to the player 2 are the color that player 2 is supposed to be. I believe that means it cant be being given to any player besides themselves or player 12 (who is allied to everyone, so that's ruled out)



None.

Jan 9 2012, 5:35 am Roy Post #2

An artist's depiction of an Extended Unit Death

Quote from sraw531
The question is, How do you make a player that never was in the game (was an open slot when you started) ally someone else?
You can't really do this. You may have to reinvent your system where the units are initially given to Player 9 and then distributed evenly between all players on the team (i.e., a Force 1 trigger saying "Give 1 [unit] owned by Player 9 to Current Player"). If you use a binary count off, you can support spawning of several units. If you are interested in this option but need more information, I (or someone else) will be happy to elaborate, but basically, the structure would be like this:

Solution using Player 9

An alternate solution would be to include logic checking to see if your teammate is in the game, and if so, you should get their spawns (i.e., instead of "Create X units for Force 1," you'd say "If Player 2 is here, Create X units for Force 1, otherwise, Create 2X units for Force 1). If you're interested in this solution, here's how you can check if a player is in the game or not:

Simple Leave Detection

Quote from sraw531
Note: I do have "Allied", "Allied Victory", and "Share Vision" done in the force options (But not random location, because I like presetting colors)
Also, The units when they are given to the player 2 are the color that player 2 is supposed to be. I believe that means it cant be being given to any player besides themselves or player 12 (who is allied to everyone, so that's ruled out)
You can give the units, but you have to specify the player number (i.e., you can't say "All Players" or "Force X").




Jan 9 2012, 9:38 am sraw531 Post #3



This information was interesting, yet did not help for my specific problem.
Specifically, Player 1 (in each force) was making units and they were being given to player 2, teleported, and ordered to a specific spot (rally)
The problem was that if player 2 was never in the game, units owned by player 1 that would be given to player 2, would be given to player 2, and attack player 1 and all of team 1's enemies.

On a side note, If player 2 was in the game and left, all his current units would be given to player 12, and the giving trigger proceeds normally.
If player 2 was in the game yet has left, the units would be given to player 2, and not attack player 1, and would still attack all of team 1's enemies. This is the desired result yet not from the desired origin.

Currently, I fixed the symptoms of the problem by making any units that normally would have been given to player 2, not be given to player 2 if player 2 doesn't have a hydra den (player 2 always begins with a hydra den, and its invul, so no way to get rid of it besides not being there, leaving, or using a suicide hack).
This makes it so player 1 still has control of the unit, when the intended ending was that player 2 would have the units and not attack player 1, but attack all of team 1's enemies normally. (basically they would become guards that couldn't be used offensively.) This also causes that the transfer trigger ends once player 2 has left the game, which is fine.

Attached is the file, for any curious.

Attachments:
Ant Wars Best v.9.scx
Hits: 0 Size: 116.49kb



None.

Jan 9 2012, 5:48 pm Wormer Post #4



Quote from sraw531
Currently, I fixed the symptoms of the problem by making any units that normally would have been given to player 2, not be given to player 2 if player 2 doesn't have a hydra den (player 2 always begins with a hydra den, and its invul, so no way to get rid of it besides not being there, leaving, or using a suicide hack).
This is actually a kind of checking logic that Roy was talking about. Anyways,
Quote from sraw531
On a side note, If player 2 was in the game and left, all his current units would be given to player 12, and the giving trigger proceeds normally.
If player 2 was in the game yet has left, the units would be given to player 2, and not attack player 1, and would still attack all of team 1's enemies. This is the desired result yet not from the desired origin.
this happens because P2 presence at start of the game gives a chance for the alliance trigger to fire. Then, after player leaves the game the alliance status isn't reset. Unfortunately, I don't think it's possible to achieve the same effect when the game starts without player 2. :(



Some.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:56 am]
Oh_Man -- cool bit of history, spellsword creator talking about the history of EUD ^
[09:24 pm]
Moose -- denis
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[2024-4-19. : 1:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[2024-4-18. : 10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[2024-4-18. : 10:11 pm]
Ultraviolet -- :P
[2024-4-18. : 10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
Please log in to shout.


Members Online: Oh_Man