playMaker

Author Topic: Hopefully super easy fix: Global variable manager  (Read 582 times)

augustdds

  • Playmaker Newbie
  • *
  • Posts: 2
Hopefully super easy fix: Global variable manager
« on: November 30, 2021, 05:11:15 PM »
Hello all, new user.  I want to use Global variable to activate a wave of enemies.  Then wait a bit, then activate another wave.  I made a game object and attached is the FSM.  i want to activate a global variable and then go to a wait state, but it just activates the global variable and does not go to the wait state.  Thanks so much.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Hopefully super easy fix: Global variable manager
« Reply #1 on: December 01, 2021, 03:50:07 AM »
Well yeah, it transitions to the global transition so it doesn't even fire next frame event.
Available for Playmaker work

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Hopefully super easy fix: Global variable manager
« Reply #2 on: December 01, 2021, 09:42:18 AM »
Hi.
A fsm can be only on 1 state at a time.

you send a event to newspawn before the next frame event, so next frame event is never triggered (and will never go to state 5).

you can :
A : place a wait after state 2, or before state 3 (and connect the global there)

B : make a 2nd fsm and use send event (By name)
     (have a 'Timer' fsm and a 'Spawner' fsm)


Just a side note.
You should name your states, so later on you know what they are doing.
It will help a lot when debugging.

augustdds

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Hopefully super easy fix: Global variable manager
« Reply #3 on: December 02, 2021, 09:39:38 AM »
Thanks all for your help.  I set up an empty object with multiple FSMs as a spawn manger and activate the FSMs after waits and it works pretty good! Thanks for your help.