Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ilovelessons on June 09, 2017, 09:59:04 PM

Title: How to delay an action within the same state
Post by: ilovelessons on June 09, 2017, 09:59:04 PM
Hi,

I already know how to delay going to a next state but I am wondering how to delay an action in the same state. Allow me to explain. Lets say I am in a state and I have 3 actions A, B and C in that order (A is on top and C at the bottom of the list).  I assume playmaker executes A , B and C sequentially. However if I wanted to delay for 2 seconds between each action how would I do this without using separate states to house each action?

Thanks
Title: Re: How to delay an action within the same state
Post by: stevecash83 on June 09, 2017, 10:17:57 PM
Use the 'Wait' function. It allows you to wait a specified amount of time before executing a new event, such as starting the next state in that FSM.

Hope that helps!
Title: Re: How to delay an action within the same state
Post by: djaydino on June 10, 2017, 05:33:10 AM
Hi,
Actually they "start" from top to bottom, but they will not wait is an action is finished.

You Can 'Right Click' in the State window and select "Action Sequence"
Now each action will be started only when the previous action has finished.

You can see if the state is set to sequence on line between the states (on the the left side) there will be a v formed.

Now you can add a wait action between a and b and c
Title: Re: How to delay an action within the same state
Post by: ilovelessons on June 10, 2017, 09:39:06 PM
Hi,

Thanks it worked... you saved me so much extra states !!!!!  Thanks again mate!
Title: Re: How to delay an action within the same state
Post by: Fesh on June 20, 2017, 04:09:59 PM
Hi,
Actually they "start" from top to bottom, but they will not wait is an action is finished.

You Can 'Right Click' in the State window and select "Action Sequence"
Now each action will be started only when the previous action has finished.

You can see if the state is set to sequence on line between the states (on the the left side) there will be a v formed.

Now you can add a wait action between a and b and c