playMaker

Author Topic: Wait action not waiting  (Read 168 times)

Eclipsed

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Wait action not waiting
« on: June 20, 2019, 03:07:36 AM »
Hi,

I've been chasing a bug for a couple of days and I've narrowed it down to a very weird issue.

What's happening:
I have an FSM with a State in which there's only a Wait action set to wait for 0.8 seconds and the "Finish Event" set to FINISHED

If I step through the FSM in the editor the action waits for the set 0.8 seconds and then continues.

BUT! if I don't step through the FSM in the editor the action just doesn't wait, it executes the OnEnter method correctly, it never hits the OnUpdate one and just continues to the next state, so something is triggering the FINISHED event.

I "solved" it by not using the FINISHED event as "Finish Event", I created another one named "Wait Over" and linked it to the action.

This is very weird, I've been staring at the code of the action (the default wait one in ActionCategory.Time) for two days now and cannot figure out why this is happening.

The problem I'm having now is that same setup (i.e. Wait action with Finish Event set to FINISHED) is used in hundreds of other places in the game.

Is this working as intended? am I missing something?

Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4518
    • View Profile
    • jinxtergames
Re: Wait action not waiting
« Reply #1 on: June 20, 2019, 08:13:34 AM »
Hi.
Can you show some images from the fsms or even better a video with the issue?

What Unity/PlayMaker versions are you using?
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

Eclipsed

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Re: Wait action not waiting
« Reply #2 on: June 21, 2019, 01:45:55 AM »
Hi,

unfortunately I cannot send you any screenshot/videos.

But the setup is pretty simple as described above, the only thing I can think of that might be relevant is the fact that before hitting the state with the wait in it, there's a state with a RunFsm action that sends back an event caught by the action itself, but that all works correctly.

Anyway, I'm at 1.9.0 with Unity 2018.3.7f1.

Also, I tried to replicate that scenario in an empty scene with just an fsm that waits 1 second and then spins a cube 45° and then repeats itself, and that all works correctly.

I'm lost :)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4518
    • View Profile
    • jinxtergames
Re: Wait action not waiting
« Reply #3 on: June 21, 2019, 06:48:54 AM »
Hi.

The correct playmaker version you can find in Playmaker/help/about playmaker...

You do not have to show image from your game, only from the states / actions.
it will make it easier to detect what the issue is.

So far i havent seen any reports yet that wait is not working, so biggest chance is that there is someting wrong with the logic.

if you use a Finish action  in the RunFsm and you set a finished event it might finish the state.
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions