How do I do pathfinding animation for many monsters

0 favourites
  • 7 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • I am doing a pathfinding behavior for my monsters where they move on their path to specific point. A monster has animation for down and right movement.

    The problem is when the first monster change his movement animation form right to down, all other monsters switch to moving down animation, although they should have the right animation not down.

    Screen shot of the code:

    "https://drive.google.com/drive/folders/0B1pGW-xaP8VfMXVpRWZPZVo2Y0U"

  • sounds like you set the animation for the object (monster) and not for the instance of the related monster.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • sounds like you set the animation for the object (monster) and not for the instance of the related monster.

    Sorry I am beginner, how could I set it to specific instance of the related monster

  • you need to use families for that -> which changes all instances, and since you don' have full C2 (according to badge) you can't do that.

    other then that i'd put:

    if monster.pathfinding.angle > 45 then monster.animate. walk down.

    other then that walk left.

  • so there is no any other way to separate each monster with his animation according to his direction of movement, without getting the full C2?

  • "System compare" doesn't pick an instance..

    You have to tell C2 which instance of the monster you want to react to your action..

    As explained in How events work

    (see the part about "unrefrenced objects")

  • Thank you so much, cleared many concepts for me

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)