Only want enemies that meet conditions to fire

0 favourites
  • 4 posts
From the Asset Store
It is a powerful and complete package containing a total of 20 enemy AI mechanics.
  • I have successfully setup a simple line of site system so when the player is behind a house the enemy no longer pursues the player or fires any shots. This works fine if there is only 1 archer on the play field, but if there are multiple archers they will all fire if one archer has a good line of sight. I want to make it so that only an archer with a good line of site fires.

    Here is the link to my capx file: lewispcservice.com/downloads/dragonrage.capx

    I should add in order to get an archer on the screen shoot a tree and it will spawn an archer.

  • I've played around with a few things and now I am getting just 1 archer shooting at me if multiple archers are on the play field with one with line of sight and one without line of sight. The problem is it only works for the first archer that is spawned. If the second archer has line of sight and the first doesn't the second archer just stands there.

    Also I discovered that if multiple archers are on the playing field and the archer is destroyed it destroys all the archers line of sights so no one can shoot then until a new archer is spawned and then whatever archer on the playing field that was spawned first will fire if there is an archer with a good line of sight.

    Here is an updated capx: lewispcservice.com/downloads/dragonrage2.capx

  • Made few fixes:

    Fixed project

    Few notes: You could use containers and families to simplify your project a lot, just by using those you could have 75% less events with 100% of the functionality and 200% more manageability! :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for the assistance and the advice. It is much appreciated, you are awesome.

    I'm still running on the free version until I have the cash to pick up the personal edition......then I can start putting items into families.

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