Two months later I'm back to this one. (OH! Thread title seems wrong now cos you suggested NOT using ArrayMaker)
I think I get what you mean here Jean, just not sure how to achieve it.
I think you are over designing this.
GREAT! It was seeming a bit complex
have four boolean variables that you flag to true when you have a player for that role. Then as a new user comes in the game, you go trhough them four variabl in the order you want, and check it, if it is false, this is the role to assign to the new player
OK I get this, but dont know how to implement it...
...but I have one more additional issue, Im thinking that I MAY want these 4 characters to be randomly chosen. this is because each charactr has a new start position, and for a single user, playing multiple times would give a different character to play (maybe) so repeat play would be more appealing.
So I need to assign these player Bools randomlySO...
1) I have to fill these bools randomly??? Dunno how...
2) Currently in Game Manager FSM I simply have a counting state, how many in the room, Int Compare etc... If there 1, then I instantiate player one
(as shown in image 1 BELOW)
So here, instead of a hard coded player, I need to got to these bools and choose the next available?
How...
THEN, When all four are chosen, I need to get a message to my FSM that created the room called Create and Join
(as shown in image 2 BELOW)
and have it Create a new one with a new name (My Room is called Main, so Main01 maybe??)I spose thats trivial...
I may have asked this before, but Im not sure how to track what happens when someone leaves... I need to see who that is, open a space in that Room, and then if a new player comes along they BOTH get the available character (not a duplicate of another, thats important, my story can only have 1 Priest, 1 Nurse, etc... This is not working now, If I player leaves NOW, they will get the 4th character, even if thats NOT the one that left... hmm.. did you get that?) AND fill up the room again, so a new character would create a whole new room..
Im afraid its all looking a bit daunting now... Is there a simple way to achieve this?
My head hurts!
MArk