Game lobby players dont switch

Laurens

New Member
Reaction score
0
Hi,

I have a problem with players how are moved in the lobby by the host to a different player slot. Sometimes this is done to make teams equally. The problem is that when we start the game and think the players are now equally devided on the two teams, it seems the player how has been moved is still his initial player number from when he entered the lobby.

I locked the lobby so no one could be switched places and get disappointed.

I want to unlock it again. If anyone knows how to fix the problem so i can unlock it i would be really happy if you let me know

There is another thing i cant figure out. It would be nice if i could let the computer play the game i am making so people can play against AI if there are not many players alround. I know this is easiest done with triggers. It should not be to difficult because the units walk atomaticly.

I need some help getting started with that so i know the basics of how to make the computer make upgrades and build refinerys on the map. thats about the only thing it needs to do. i was thinking to do it with timers. For the rest if there is someone how nows more about this please let me know.

Laurens
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Unfortunately, that's how the player numbers work. They represent the order players joined the lobby, not their position in the lobby.

I suggest you work around this and remake your code so it doesn't actually rely on the actual player number.

Do you have it divided by teams? Say you have player 1-3 in team 1 and 4-6 in team 2. Maybe you normally did something like: if ((Triggering Player) < 4) to check if the player is in team 1 or 2. However, there's a method that returns all the players on a team, so check if the player is in this player group instead of relying on the id.

As for AI, it can be rather complicated. I do all of my AI in the trigger editor by basically having a main loop (a trigger with a periodic event of like 0.5) and then a lot of if-then-else to figure out game logic. You can tell the AI to get upgrades and stuff by using the Issue Order action.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top