3/4 top-down perspective NPC Animation

0 favourites
  • 6 posts
From the Asset Store
Set of tiles to create a map for top-down games with island theme
  • Hi everyone,

    Just bought a license so this is my first post.

    Last few days have been spent trawling here, youtube, google etc for tutorials and answers.

    I am trying to achieve

    Subscribe to Construct videos now

    style of NPC movement from a similar perspective. I got the player movement working correctly using a family group of sprites.

    Problem: Creating multiple instances of enemies that are capable of moving in 8 directions with 4 direction walk animations (up, down, left, right)

    -Extra stuff-

    I managed to get one instance working properly in all four directions but I using a family group and and set position but I came to realize you cannot create/spawn new families as a whole. So my other instances were just the shadows.

    I know I will need to use this smoke trail

    tutorial for multiple instances but first I need to figure out which method of organizing and positioning sprites onto the shadow is best

    I've tried to pin a sprite onto the enemy shadow which contained all the animations but I couldn't get it to calculate angles properly and then my other instances broke.

    I am now wondering which movement behavior is needed, bullet, custom, pathfinding, 8 direction or a combination of them.

    I'll get a capx up soon.

  • You should have a look at my bomberman tutorial that's the kind of movement/perspective both the player and enemies have.

    For the creeps (enemies) I've been using the pathfinding behavior, but it is possible to use any other behavior that suits your needs best.

  • Merci!

    I'll check out path finding, is it resource intensive calling the function every time and attempting to recalculate the paths?

    current capx

    temp-share.com/show/f3Yg6h9Qn

  • I'll check out path finding, is it resource intensive calling the function every time and attempting to recalculate the paths?

    Yes, you don't won't to be recalculating your obstacle map/course every tick.

    But if you delay it "smartly" (like once a few seconds and not for all your instances at once) I think it can do the trick.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you very much for your help thus far.

    Working from both your bomberman tutorial and the rocket trail

    tutorial from OP, how would you deal with pathing from newly spawned/created instances?

    The bomberman tutorial only seems to work with instances already

    created because it uses their UID but I think we don't know the

    UID from a newly created instance

    also I don't understand what "function.param(0)" is doing from the Pick UID event

  • about the function..

    the call function "stores" the uid number in parameter0 from the event it calls the function,then in the executed function itself it picks the "sprite" with uid(parameter0)

    looking at the capx, for a newly created creep you should

    make the same function as "creepPickDestination" without the creep-picking condition

    name it "newCreepPickDestination"

    on creep created , call "newCreepPickDestination"

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