HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A bug that's not making any sense...

06-05-2004, 04:22 PM#1
Maegus
My footman wars map is nearly ready for public beta testing... but there's one small but critical bug that's keeping it from working at all.

At map initialization, I assign each player a team number and add them to their team's player group. However, for some odd reason, some players get added and some don't, even though the triggers for each player are identical. Here's what I did:

For each Integer A from 1 to 3
If:
Player(Integer A) slot status not equal to Is Unused
Player(Integer A) slot status equal to Is Playing
Player(Integer A) slot status not equal to Has Left The Game
Player(Integer A) controller equal to User

Then:
Add Player(Integer A) to Team[1]
Set TeamNumber(Integer A) = 1

For each Integer A from 4 to 6
If:
Player(Integer A) slot status not equal to Is Unused
Player(Integer A) slot status equal to Is Playing
Player(Integer A) slot status not equal to Has Left The Game
Player(Integer A) controller equal to User

Then:
Add Player(Integer A) to Team[2]
Set TeamNumber(Integer A) = 2

...


I do the same thing for the rest of the teams.

Now, when I test the map as player Red, everything works fine. But, when I test the map as player 5 (yellow), my team number is set to 2, but im not in the Team[2] player group. What the hell? It obviously passed the conditions if my team number is 2, but why didnt yellow get into Team[2]? I looked through my triggers and I've seen no other triggers that would interfere with this. I haven't tested this with the other player slots...

The reason this is so critical is because at 0 seconds into the game, it checks which players are not in a player group and then kills their main base if they arent in one. Of course, you could just say "have it check for team numbers instead", but there's still plenty of other triggers that would be affected by the problem... and it would take some time to redo those too. Can someone figure out why this isn't working?
06-05-2004, 05:30 PM#2
Shimrra
Is Player[X] is a variable. If so, make sure that you set Player[1] = Player 1 (Red) and so on. Also, why say use an if\than\else if you use all those conditions... Basically, that says if Player[Integer A] is not controlled by a com, then do actions.
06-05-2004, 05:55 PM#3
Maegus
Quote:
Originally Posted by Shimrra
Is Player[X] is a variable. If so, make sure that you set Player[1] = Player 1 (Red) and so on. Also, why say use an if\than\else if you use all those conditions... Basically, that says if Player[Integer A] is not controlled by a com, then do actions.

I used Convert Index to Player, so that's all set by default, I'm sure. That would have to work, anyways, for Yellow's team number to be set to 2.
06-05-2004, 06:44 PM#4
Shimrra
Well, if you're going for alliances, just use the force editor in the options menu. Also, you can use Player - Ser alliance triggers. Finally, you can just add Player's one, two, and three to a Player Group 1, then add Player four, five, and six to Player Group 2 and so on.

If this has nothing to do with what you're looking for, please try explaining what you want and I might be able to give you a trigger.
06-05-2004, 07:24 PM#5
Maegus
Quote:
Originally Posted by Shimrra
Well, if you're going for alliances, just use the force editor in the options menu. Also, you can use Player - Ser alliance triggers. Finally, you can just add Player's one, two, and three to a Player Group 1, then add Player four, five, and six to Player Group 2 and so on.

If this has nothing to do with what you're looking for, please try explaining what you want and I might be able to give you a trigger.

The alliances are working fine, but I still need variables that filter out computers/empty player slots and identify the players IN those alliances, because plenty of my triggers need that. My above triggers were not working very well for very odd reasons. They passed the conditions but didn't do all the actions, and only worked for certain players.
06-05-2004, 07:33 PM#6
Vexorian
I heard (read) that the Player status check doesn't work well most of the times, apparentally has to do with mac and pc users in the same spot, try doing that stuff at 0.0 elapsed seconds
06-05-2004, 08:03 PM#7
Maegus
Quote:
Originally Posted by Lord Vexorian
I heard (read) that the Player status check doesn't work well most of the times, apparentally has to do with mac and pc users in the same spot, try doing that stuff at 0.0 elapsed seconds

still no change... =\