playMaker

Author Topic: Move Object - wait until move is complete before proceeding  (Read 944 times)

EverySingleSoldier

  • Playmaker Newbie
  • *
  • Posts: 26
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

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Move Object - wait until move is complete before proceeding
« Reply #1 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.


Prestonh

  • Playmaker Newbie
  • *
  • Posts: 44
Re: Move Object - wait until move is complete before proceeding
« Reply #2 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.

EverySingleSoldier

  • Playmaker Newbie
  • *
  • Posts: 26
Re: Move Object - wait until move is complete before proceeding
« Reply #3 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.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Move Object - wait until move is complete before proceeding
« Reply #4 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 :)
Available for Playmaker work