playMaker

Author Topic: Switching FSM (for a newbie)  (Read 1677 times)

ricksterZH

  • Playmaker Newbie
  • *
  • Posts: 2
Switching FSM (for a newbie)
« on: July 02, 2015, 09:35:19 AM »
Hi,

I am trying to do my first game and I have a problem to understand how to switch between the FSM states.


- LevelManager is starting the SetupBoxes FSM Process (which is creating the RandomBoxes with Arraymaker) and then the Game. When it's finished the Levelmanager will continue (I want do this with FSM State Test).

When I want to test it, the "SetupBoxes FSM" is disabled (see printscreen) and the levelmanager is waiting for the "SetupBoxes FSM" to finish. It seems my start command for the "SetupBoxes FSM" is not working in my setup.

Any suggestions?

Cheers Rick


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Switching FSM (for a newbie)
« Reply #1 on: July 02, 2015, 09:52:09 AM »
Hi,
In send event there is no GameObject assigned,
but in prefab you can not assign them.
So you can use a global variable (GameObject)

When the prefab with the SendtoGameManager on it comes in the game let it set the variable with the "set game object" action

on the "send event" action click the = next to the "None (GameOject) and select the global

ricksterZH

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Switching FSM (for a newbie)
« Reply #2 on: July 07, 2015, 04:34:37 AM »
Your solution with the "transfer object" works.
 
But after a short overview to my project I found out, that in my case it was silly to put the FSMs as prefabs. I put them out (duplicated in the hierachy) and deleted the prefab. 

Everything works now.

Thank you djdino!
« Last Edit: July 07, 2015, 04:37:01 AM by ricksterZH »