playMaker

Author Topic: [SOLVED]problem with Get FSM State  (Read 1094 times)

Dustiwi

  • Playmaker Newbie
  • *
  • Posts: 28
[SOLVED]problem with Get FSM State
« on: December 23, 2021, 07:54:26 AM »
hi, im trying to make something happen using string switch, trying to use get fsm state.
for example i have fsm 1 and fsm 2, im trying to get fsm state from fsm 2, i even pick the fsm i want on the list, but it doesnt matter what i pick, it always shows the state from fsm 1, dont know if im doing something wrong or its a bug.
pls help and thanks in advance
« Last Edit: December 24, 2021, 09:04:04 AM by Dustiwi »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: problem with Get FSM State
« Reply #1 on: December 23, 2021, 10:06:52 AM »
Hi.
What actions are you using in state 2?
and is it looping back to state 1?

If the state has no 'sort of delay' (for example a Wait / Next Frame Event / Audio Play (with Wait for end of clip enabled))

It is possible it will not register since its changing state within the same frame.

Dustiwi

  • Playmaker Newbie
  • *
  • Posts: 28
Re: problem with Get FSM State
« Reply #2 on: December 23, 2021, 10:53:03 AM »
i think i didnt explain myself properly im sorry. heres what im trying to do:
i have this enemy which i wanna stun on a cooldown so the player cant stunlock it, i tried getting the fsm state, which is in the EnemyHP fsm, but the stored result is showing the states on the Movement fsm, its storing all the results fine, only problem is that is not the fsm i wanna get the state from.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: problem with Get FSM State
« Reply #3 on: December 23, 2021, 04:23:05 PM »
Hi.
Did yo drag in the component or the game object?
if object it probably took the 1st fsm on the object (see inspector).
you could also try to place the fsm that you target to the top in the inspector.

Maybe you can try using 'Fsm State Test'

Dustiwi

  • Playmaker Newbie
  • *
  • Posts: 28
Re: problem with Get FSM State
« Reply #4 on: December 24, 2021, 09:03:38 AM »
i was using the component, i tried with the game object and moving the fsm to the top and that seemed to do the trick, thanks sir