Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: EverySingleSoldier on July 21, 2021, 11:29:31 AM

Title: Move Object - wait until move is complete before proceeding
Post by: EverySingleSoldier on July 21, 2021, 11:29:31 AM
Using the Move Object to move an object but want to moving object to complete its move first and then the state machine can continue. The Move Object does have a Finish Event, but I only want it to activate the finish event once the actual transition is completed, due to speed settings etc
Title: Re: Move Object - wait until move is complete before proceeding
Post by: djaydino on July 21, 2021, 11:50:47 AM
Hi.
move object should only finish when it ended but you should use other transition names than the default Finished event.

Title: Re: Move Object - wait until move is complete before proceeding
Post by: Prestonh on July 22, 2021, 03:40:54 AM
If using rigidbody, just test gameobject speed.   If not using rigidbody.  You could get position of object and of target,  distance check.   Or get distance of object wait a couple frames,  get position again,  distance check those.
Title: Re: Move Object - wait until move is complete before proceeding
Post by: EverySingleSoldier on July 22, 2021, 07:17:59 AM
Thanks for the assistance, I am just using a Wait command of .2 real time, which is about the time it takes the GO to move to the next hex.
Title: Re: Move Object - wait until move is complete before proceeding
Post by: Fat Pug Studio on July 23, 2021, 01:28:58 PM
You can use the countdown action if you want to wait in time units. I also propose setting the wait time to a variable so you can also use a divisor if you are having different speed settings in the game. Think up front :)