playMaker

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

LordHorusNL

  • Beta Group
  • Full Member
  • *
  • Posts: 226
Get Fsm Bool Action missing code for looping
« on: July 09, 2018, 12:56:36 PM »
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, 01:25:23 PM by LordHorusNL »

jeanfabre

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

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

 Bye,

 Jean