How do I change the team?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
User avatar
WIZ4
Fast Inserter
Fast Inserter
Posts: 209
Joined: Thu Apr 07, 2016 1:36 pm
Contact:

How do I change the team?

Post by WIZ4 »

How do I change the team? At 0.12 this command to work "game.get_player('WIZ4').force = game.forces['neutral']". In 0.13 it did not work
My native language is russian. Sorry if my messages are difficult to read.

zebediah49
Fast Inserter
Fast Inserter
Posts: 119
Joined: Fri Jun 17, 2016 8:17 pm
Contact:

Re: How do I change the team?

Post by zebediah49 »

As of 0.13 --

>Removed game.get_player() and game.get_surface(): game.players[] and game.surfaces[] can be used instead.

So, `game.players['WIZ4'].force = game.forces['neutral']` is the new replacement.

User avatar
WIZ4
Fast Inserter
Fast Inserter
Posts: 209
Joined: Thu Apr 07, 2016 1:36 pm
Contact:

Re: How do I change the team?

Post by WIZ4 »

zebediah49 wrote:As of 0.13 --

>Removed game.get_player() and game.get_surface(): game.players[] and game.surfaces[] can be used instead.

So, `game.players['WIZ4'].force = game.forces['neutral']` is the new replacement.
Thank you!
My native language is russian. Sorry if my messages are difficult to read.

Pascali
Fast Inserter
Fast Inserter
Posts: 170
Joined: Wed Aug 23, 2017 8:24 pm
Contact:

Re: How do I change the team?

Post by Pascali »

How do i change team in a running game from green to purple team f.e.?

Mgis09
Inserter
Inserter
Posts: 27
Joined: Sun May 06, 2018 3:58 pm
Contact:

Re: How do I change the team?

Post by Mgis09 »

Is there any command now (0.17.79) to move somebody to another team, or at least kick him into spectator or lobby?
Btw closing a team would be useful too.

Post Reply

Return to “Gameplay Help”