• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Changing Observer PlayerState into User PlayerState Possible?

Status
Not open for further replies.
Level 7
Joined
Jul 5, 2007
Messages
338
Hi, I was able to make a Player into an Observer using the following Custom Script action:

JASS:
call SetPlayerState( udg_PlayerVariable, PLAYER_STATE_OBSERVER, 1)

Is it possible to do it inversely? Meaning can you change someone who has been changed into an Observer via the above action into a Player/User again?

EDIT: On a side-note, sorry if I submitted to the wrong section. Only realized until now I placed it in the wrong section possibly.
 
Level 7
Joined
Jul 5, 2007
Messages
338
I don't think it's possible, because observers aren't counted as real players.

andPlayerwill crash if you input too high of a number.

Thank you for the relatively quick response.

The problem is that they are originally Players/Users at the start. The Player becomes Observer status during the game.

Is it still impossible if they're initially User-converted Observers? Ultimately, that's what I would like to get out of this thread. To be unsure about the situation is difficult to ascertain whether it's possible or not.
 
Level 7
Joined
Jul 5, 2007
Messages
338
I forgot, are observers like extra players? or is it an option you can select in b.net, and will replace an active player?

If the latter, this is how you should do it.

JASS:
call SetPlayerState(p, PLAYER_STATE_OBSERVER, 1)
call SetPlayerState(p, PLAYER_STATE_OBSERVER, 0) // reverse

Observers take up Player slots, so I think they essentially become an Active Player.

Thanks, will try and see if it works.

[Double-Post]

Yes, it worked. Thank you very much.
 
Last edited by a moderator:
Status
Not open for further replies.
Top