I am creating a map, and it seems that when a player moves to another spot (if he originally was on player 2's spot, and moves to player 5's spot (in the lobby)) his player number is still player 2 in game.
Is there any way to fix this without having locked teams?
I just want the players to be able to move around on the teams, and get player numbers coresponding to their spots.
my map is 4v4, and if I want to test it with a friend, I need to add full AI's and remove one on the team I want him to be on.
I dont know if I posted it on the wrong forum, but tell me if I did.
Gridlock TD : Elements
The function "Player on Team" gets you lobby positions - Use that when necessary. (Player 2 on Team 1 is the second lobby slot for example, Player 1 on Team 2 is the first slot on the second team, etc.)
Projects: Starmon - RuneCraft
Player IDs are tied to the order players join the lobby. I think it's probably one of the most damaging issues to the map-making community, as it makes keeping players organized really difficult.
I will give a quick explanation of how it works (at least as I understand it.. if somebody thinks I am wrong please speak up). When a player joins the lobby they are given the next available player ID, and that sticks with them permanently until they leave the game. So the person who created the game will always be Player 1, until they leave and then that slot becomes available. The next person to join will now become player 1. Their position in the lobby or on their team is totally irrelevant.
To circumvent this really confusing and pretty much useless system you can do one of a few things:
The in-game lobby route is a lot of work to build, but it gives you the most control over the players and the teams. It's also easier to copy from map to map, as game attributes cannot be copied without causing a lot of problems...so you have to recreate them in each map you make.
I hope this helps.
Quote:Player IDs are tied to the order players join the lobby.
Player IDs are tied to the order players join the lobby.
I assumed this was true for AIs as well.
It took me a LLLOOOOOOOOOOOOOOOOONNNNGGGGG time to debug a problem I was having which was due to the way AI players are assigned numbers.
The AIs are given numbers from the last available number forward.
So if you start a game with 6 player slots available, add 2 AIs and then a human player joins the game lobby will look like this:
1 - human_1
2 - computer1
3 - computer2
4 - human_2
5 - empty
6 - empty
However the player numbers will be assigned as such:
1 - human_1
2 - human_2
3 - empty
4 - empty
5 - computer_2
6 - computer_1
Just something you have to look out for as I unfortunately had to learn the hard way
That has been my experience with computer players as well. So you are definitely right that this is how they function.
I can seperate the players in groups then, by checking which team they are on.
How does that condition work though? Is it (Players on Team 1 == 1) would that return true if player one is on team 1?
NOTE: I did get it to work by setting a player group for each team, and setting them to "Players on team".
That's what you want for "Is player X on team Y?"
If you want "Is player X in slot Z of team Y?" You'll have to use "Player from player group" and compare it to another player/integer parameter (So manually put in player number, or if Triggering Player, Picked Player, or whatever else fits the situation)
"(Players on Team 1 == 1)" is comparing player groups ("1" isn't actually a valid option for the comparison, you'd need to convert player to player group) which I guess only returns true if the player groups consist of the same players.
yea ok :)
Cant belive I didnt think of this-_- well thanks for the help :) You're a lifesaver ;)
You must login to post a comment. Don't have an account? Register to get one!