playMaker

Author Topic: How to RECEIVE Photon View FSM events  (Read 1600 times)

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
How to RECEIVE Photon View FSM events
« on: February 20, 2014, 10:28:29 AM »
Hi!

(EDIT; STILL HAVING PROBLEMS WITH THIS; BUT ATTACKING IT FROMANOTHER ANGLE; ILL POST SOMETHING NEW HERE LATER::: FOR NOW PLEASE IGNORE!!!)

I think im nearly there, stuck one one thing.

I have Arraymaker on a PlayerManager FSM contains 4 character prefab game objects.
So on the PlayerManager FSM I have an Array List Get Random, to randomly select a player from its List, set a global variable with that character as the game object.
Another FSM recieves this Game Object and Spawns it.
This way it CANT try and spawn before it has the reference.

Each time a player is instantiated it should send Photon View RPC Broadcast Event to the Player Manager and have it REMOVE that character from the List.
So far I am receiving these (via a debug message) OK.

BUT how can I collect these events and have them update the List before it makes the random choice and sends out the player choice?

I cant just replace the Start State with 4 Global Transitions, as any one of them will then played thru my FSM. I need a kind of "check" to see if this Photon Even has fired...
Im sure Im just thinking thus backwards..

Mark



« Last Edit: February 23, 2014, 05:59:39 PM by markfrancombe »