Behavior "Wander": animation doesn't change when actor changes direction

Tim1988

  • Posts: 3
Hi,

I'm a Stencyl beginner, working on my first game.
It's a 2D RPG game in which you can explore a medieval village.

In most scenes there are persons who walk around randomly. When I use the behavior "Wander" for these actors, their animations don't change when the actors change direction. How can I solve this problem?

Thanks in advance!

Luyren

  • *
  • Posts: 1752
The "Wander" pre-made behavior doesn't have any logic to change animations, you have to code that yourself.
Working.

Tim1988

  • Posts: 3
I've tried to code that, using the event "When updated" for an actor that walks around, but it doesn't work.
Here's an example for the actor "Monk":

« Last Edit: June 10, 2019, 10:26:56 am by Tim1988 »

Luyren

  • *
  • Posts: 1752
Doesn't work because your speed is never reaching that exact value. Use the "greater than" or "less than" blocks instead: X > 0 is right, Y > 0 is down.
Working.

Tim1988

  • Posts: 3
OK. Now it works. Thanks!