Platformer enemies

0 favourites
  • 4 posts
From the Asset Store
10 Retro songs ideal for platformers or farming games
  • Hi,

    I've been trying to make an enemy walk up to my player once their line of sight is broken and then, perform one of two attack at random.

    If any one could help with this that would be great!!! I am aving trouble finding the information online.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You've explained it well so I guess you have the walking and line of sight done already? When they are not in line of sight (LOS inverted) you can then set a variable to choose(0,1) this picks either 0 or 1, then you relate 0 to one attack and 1 to the other. You can pass these variables through a function for attacking if you know how.

  • Hi,

    so, here is a copy of what I've done: we.tl/lt64vPYEpS

    I'm having trouble just making my npc move and if i'm being honest I have no Idea how to make him attack once he reaches my Hero.

  • Looks like you have it sorted...the reason he won't move is because of your mismatch between RUN and Run, be careful with that...it sets to RUN but then checks for Run.

    You also have another issue which is although your barbarian is looking left the angle is pointing to the right so the cone of vision points right. You could set to 360 initially i suppose, note that setting it to 360 after trying to detect LOS as you have done will not do much.

    I've set up an attack function here :

    dropbox.com/s/do9xz5v3lt5eg2g/Space%20knight.c3p

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