Oh right I think this would work, I was over thinking it. I was trying to make each player a variable and then was trying to switch them. Switching units makes a lot more sense, thank you.
This is prone to bugging as any hard-coded player constants will not point at you during testing (and we all know how mappers use them everywhere). Instead I would recommend that you take full control (full shared control alliance state) of the player and go about issuing orders as if the player was a human. It is even possible to have full control of your enemies so diplomacy is even kept correct (this was even possible in WC3). For trigger related systems you can add yourself to the visibility group that the player uses for anything locally shown so you can also test if that works.
sharing control with them will often be preferable if that helps you.
Swapping ownership of units can mess things up a bit. All orders are cancelled, building construction and unit training gets removed and IIRC resources are not returned to the players. Also some abilities which are in progress get messed up.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Is there a way or trigger to allow me to switch back and forth between different players for multiplayer testing? Thanks.
Attached a map, do you mean something like that? (type in "-switch" into the chat to change owner)
Just send me a PM if you have any questions
@TheUltragon: Go
Oh right I think this would work, I was over thinking it. I was trying to make each player a variable and then was trying to switch them. Switching units makes a lot more sense, thank you.
This is prone to bugging as any hard-coded player constants will not point at you during testing (and we all know how mappers use them everywhere). Instead I would recommend that you take full control (full shared control alliance state) of the player and go about issuing orders as if the player was a human. It is even possible to have full control of your enemies so diplomacy is even kept correct (this was even possible in WC3). For trigger related systems you can add yourself to the visibility group that the player uses for anything locally shown so you can also test if that works.
sharing control with them will often be preferable if that helps you.
Swapping ownership of units can mess things up a bit. All orders are cancelled, building construction and unit training gets removed and IIRC resources are not returned to the players. Also some abilities which are in progress get messed up.