playMaker

Author Topic: Get Fsm Bool Action missing code for looping  (Read 107 times)

LordHorusNL

  • Beta Group
  • Full Member
  • *
  • Posts: 122
    • View Profile
Get Fsm Bool Action missing code for looping
« on: July 09, 2018, 09:56:36 AM »
I've found that the "Get Fsm Bool" and most of the other "Get Fsm Actions" are missing a small section of code that allows the user to loop through Fsm components on the same object.

This is fix is already implemented in most of the "Set Fsm Actions" it would seem.

At present it's set up so that only the value of the first Fsm found on the gameobject is retrieved.

I've fixed it on my end by changing the following.

if (go != goLastFrame)
{
   goLastFrame = go;
   fsm = ActionHelpers.GetGameObjectFsm(go, fsmName.Value);
}

To

if (go != goLastFrame || fsmName.Value != fsmNameLastFrame)
{
   goLastFrame = go;
   fsm = ActionHelpers.GetGameObjectFsm(go, fsmName.Value);
}

I thought i'd just post this in case any other people run into this problem.
« Last Edit: July 09, 2018, 10:25:23 AM by LordHorusNL »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13137
  • Official Playmaker Support
    • View Profile
Re: Get Fsm Bool Action missing code for looping
« Reply #1 on: July 30, 2018, 05:07:41 AM »
Hi,

 ok, thanks, I have raised a ticket internally for this to be addressed for the next release.

 Bye,

 Jean