playMaker

Author Topic: Execution order all over the place  (Read 562 times)

BonzerKitten

  • Playmaker Newbie
  • *
  • Posts: 6
Execution order all over the place
« on: December 08, 2022, 12:30:38 PM »
Hi! I've recently realized that PlayMaker executes each FSM in an object based on what seems to be a completely random criteria, which can be quite problematic if you need things to happen in a specific order.

For example, the PlayMaker YouTube channel recommends that users create multiple FSMs for different purposes instead of one giant spaghetti, so that's what I did. I made one FSM to control the player camera and one for the player movement. However, PlayMaker REALLY wants to move the player before turning the camera, so there’s always a one frame delay in the movement direction. This could easily be fixed in C#, but I wasn’t able to find a solution for PlayMaker.

Does anyone have any advice for fixing this design flaw in PlayMaker? Otherwise I’ll be forced to drop the asset. If I’m facing inconsistencies with very small features, who knows what else could break down the road...  :-\

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: Execution order all over the place
« Reply #1 on: December 08, 2022, 06:33:36 PM »
I think this is the same for c# scripts. But if Execution is of importance then you would set the order yourself. With Playmaker you would use events for that.

But for something running in update as player movement and camera movement, this happens every frame, no? So how would you solve it in c# script? I bet it's the same in Playmaker.

Maybe put both into a PlayerManager and set the order of the FSMs?

drown

  • Junior Playmaker
  • **
  • Posts: 58
Re: Execution order all over the place
« Reply #2 on: December 09, 2022, 01:27:57 AM »
If you go on a state and click the gear Icon on top of the state window you can set the specific state to "action sequence". This runs each action one after the other.

Otherwise the criteria is not random, but defined in the actions code which you can view.

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: Execution order all over the place
« Reply #3 on: December 09, 2022, 11:23:35 AM »
What's the "Action Code"?