NPC mimic player movement.

This forum is currently in read-only mode.
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Hey Guys!

    Not even near this point of the game design but I wanted to ask now incase I do decide to use it for something else.

    I am working on a 2d platformer - I want an NPC to follow my movement to the end of the level but I want it to be delayed. Examples of this are Ninja Gaiden and Ninja Spirit to name a couple.

    I know it has something to do with actually controlling the npc with a lag in the controls but I'm not sure how to go about this in construct.

    Off the top of my head I think of getting the angle, animation, speed etc. from the main player sprite and putting a timer on it... but I can see that causing a stutter. Maybe using a bullet behavior to control the npc?

    Thanks for the help in advance! I'm loving making this game - too bad I can only do it between 8pm and 2am...


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There were some examples of how to do the "braid" thing (recording the player for later replay, just don't use it reversed), could help here as well. Just look for "braid" or "braid-like".

    Basically, sample the player's spatial data at fixed intervals (store them in s or an array or a hash table) then apply it to the npc with a delay.

    EDIT: Don't know exactly what you mean by stutter, but in case it means the npc could move with sharp transitions, you can work against that using lerp.

  • Thank you kindly! I'll look into it!! I don't remember if I've ever checked that game out or not...

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