playMaker

Author Topic: Point and click game help  (Read 2918 times)

Grave_sts

  • Playmaker Newbie
  • *
  • Posts: 24
Point and click game help
« on: January 11, 2012, 03:15:06 AM »
Hey all~

I am currently working on a point and click game - using playmaker. I have 2 issues I am not sure how to solve...

1) How do I stop playing my 'walk' animation when the character reaches the clicked position on the map?

2) I have buttons on the screen that the player can click on to zoom for instance but, when the player clicks activating the action the character moves towards where the button is located.

- the camera is top down.

Thanks in advance

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4003
  • Official Playmaker Support
    • LinkedIn
Re: Point and click game help
« Reply #1 on: January 14, 2012, 07:53:50 PM »
1) There are a few ways to do this.

Make a MovingToTarget state and an Idle state.

The MovingToTarget state starts the walk animation, and the Idle state starts an Idle animation.

Transition to the MovingToTarget state when the user clicks on the world. Transition to the Idle state when the character reaches the target.

If you want more control, you can make an FSM that just controls the animation of the character. Then you send events to the Animation Graph FSM like "StartWalking", "Stop" etc. The Animation Graph can handle the transitions and even play animation sequences with multiple states.

There's a tutorial on how to set up animation graphs (watch it on YouTube for HD):


2) What GUI system are you using? Unity GUI actions should eat the click... but I'll double check.