playMaker

Author Topic: Set FSM not working at runtime  (Read 1574 times)

xtr33me

  • Playmaker Newbie
  • *
  • Posts: 9
Set FSM not working at runtime
« on: March 06, 2019, 03:17:23 PM »
I am a bit lost as to why this isn't working, but I thought someone here might be able to possibly see what I'm doing wrong. Perhaps I am just misunderstanding something here.

I have a global event that fires and I then go about resetting the FSM variables. I am using the SetFsmFloat, SetFsmInt, etc to reset the values that are in the globals.  I see that it enters the Setup state without error, but the values themselves never get reset. Am I misunderstinading the purpose of SetFsmXxx?



One other question since Im here, I also was using SetFsmBool but can't seem to set this to true or false, what am I supposed to be using instead?

xtr33me

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Set FSM not working at runtime
« Reply #1 on: March 06, 2019, 04:05:52 PM »
Ok....so I got things working, but not sure as to why it wasn't working the other way.  For "Variable Name" if I type in the name itself, it ended up working.  When I selected "Use Variable" and then selected it from the drop-down under "Globals->Convert->SecondsLeft_Float" for example, it didn't.

I'm happy things are working, but if someone can explain why my previous method via selecting the variable name wasn't working, I would love to know just so I understand for the future.

Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Set FSM not working at runtime
« Reply #2 on: March 07, 2019, 10:25:41 AM »
Hi.

on the image i can see that you got things mixed up

for example, on the  'Set Fsm Float' :

on "Variable Name" you set the Variable 'SecondsLeft_Float'
in that variable you can see that it says '300'

So the action will be looking for an fsm called 300 (not SecondsLeft_Float)

its what's inside a variable that will be used.


You can have the SecondsLeft_float variable on the "Set Value" (with the 300 value)

And you could make a string variable with the target variable name in it and use that on the "Variable Name"

Hope you understand what i mean, if not let me know.
I will make a video to explain then :)