0 Favourites

Cannot get enemy to attack player

  • I have been working on a level and Im trying to get the skeleton enemy to walk toward the player and attack and cause damage I have a link to the capx file. Can someone tell me where I am going wrong and give a screenshot of the event sheet with the correct settings I cant seem to get it to work.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • I didn't download your CAPX. Too big.

    BUT if you want the enemy to stop and attack you need to use a global variable as a stop trigger and a condition to make it stop.

    On Enemy Overlapping Player: Set Stop=1, Play Attack animation

    Any other events that move the enemy should have the added condition On Stop=0

    That way when the enemy overlaps or collides with the player the global variable is triggered and stops any other enemy movement so the attack animation is played.

    Once the attack is over reset the global variable to 0 if the enemy was not destroyed.

  • Something along these lines is what you're looking for?

  • Something along these lines is what you're looking for?

    Hi Thanks to both of you for the replies to my question about enemy move and attack, celstrider I was trying to use the settings you provided in the screenshot you provided but after I add a System event I dont know what option I need to choose to get the distance (enemy.X.enemy.Yplayer.X.Player.Y) will you tell me which event option I have to choose to enter these values? Im new to construct 2 and I have been stuck with this enemy attack problem for a long time now.

  • system - "compare two values"

    first value: distance(ect)

    <

    second value:

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
[plugin] Youtube player
175 20,544
rexrainbow's avatar
rexrainbow
Unread hot topic
49 6,119
sekocit's avatar
sekocit

You do not have permission to view this topic