Hopefully this is Easy!

  • Hello there,

    So I'm making a sneak game so I was wondering if I could add a sound implement? What I mean is, is that if the player (you) doesn't "sneak" within a certain vicinity then the enemy will immediately snap to the player and look for them! Any tips?

    Thanks in regard,

    Chris

  • If your game is top down and the enemy object has "pathfinding" behavior

    1- compare player distance to enemy distance ... Add event - System - compare two values - first value is dhe minimal distance the player can move close to the enemy without being detected ( you decide that) is smaller "<" than the second value , which is (player.x,player.y,enemy.x,enemy.y)

    2- on the same event ad another condition - if player is not sneaking ... i would use a local variable for the player , sneakint=1 or sneaking=0

    If player is not sneaking , so sneaking=0 than this second condition is true .

    3- add action - enemy - find path to (player.x,player.y)

    4 - new event - enemy - if path found - fallow path ...

    In case your game is a sidescroller with gravity , i think you will find a way for the enemy to go to the player

  • Sneaking Capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks everyone for the replies! Figured out what I wanted!

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