Make enemy stop following after losing line of sight

0 favourites
  • 5 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • Okay so I'm really early in my game. It's an 8 direction movement puzzle.

    I made the enemy first before everything rotate to the player's direction, then I put "Line of sight" and "Bullet" behavior so this way when the enemy sights the player, the bullet is enabled and he goes after him and goes directly to him since he's always turning to the player's angle.

    The question here is that how do I make him disable the bullet when he loses sight, this is possibly( more likely) a dum question, but I seriously can't find anything about that in the event sheet, no way to disable bullet when line of sight goes.

    Thanks much!

  • Roughly, Has LOS, Enable bullet, else Disable bullet

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Edit: Blackhornet posted during this. I was going to suggest looking up "invert condition". Still useful Some time you might find it useful to invert the 'has LOS' condition to achieve similar results.

  • Roughly, Has LOS, Enable bullet, else Disable bullet

    haha Well that was pretty darn simple, can't believe I didn't even notice "else". Thanks much!

  • Edit: Blackhornet posted during this. I was going to suggest looking up "invert condition". Still useful Some time you might find it useful to invert the 'has LOS' condition to achieve similar results.

    Thanks a lot I looked it up and it helped me greatly!!! I think I should really test everything in this engine before i continue But really thanks a lot!

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