playMaker

Author Topic: Update action on the fly. [SOLVED]  (Read 1672 times)

xohmg

  • Playmaker Newbie
  • *
  • Posts: 7
Update action on the fly. [SOLVED]
« on: July 20, 2014, 05:09:46 PM »
Right now I have an input manager that reads if the player has touched the screen. When he does, it moves the player to the location touched. That part works. Now I'm trying to make it so that if the player touches the screen in a new location whilst the player object is moving, I would like the player object to change course and head to the new location. Everything I tried makes me have to wait for the original move to be completed before being able to send a new location.

Any thoughts?
« Last Edit: July 21, 2014, 08:57:23 AM by xohmg »

MajorIdea

  • Full Member
  • ***
  • Posts: 131
Re: Update action on the fly.
« Reply #1 on: July 20, 2014, 06:50:03 PM »
How about using two FSM instead of one?

One of them reads the touches on screen and sends an event to the other that handles the movement.

xohmg

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Update action on the fly.
« Reply #2 on: July 21, 2014, 08:57:11 AM »
Yea I changed it so that the input manager sends an event on the FSM of the player and he processes the move. That fixed the issue.

Thanks.