Prevent all enemies react at once when overlap

0 favourites
  • 9 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • This time Iam the one who needs help lol

    what i try to do here is a patroling platform enemy with a vision area that when the player overlaps,the enemy will start chase the player, but only inside its patroling zone.

    Sofar i got nearest to what i desire by using sprites for making the distance because playing with the system distance caused too much trouble....

    Now heres what I need, I got two same enemies set up in their own patrol zone whos share same events and actions.

    I need the enemy to ignore chasing actions when the other one spots the player so I can use this to create a level full of enemies with their own patrol zones.

    File: dl.dropbox.com/u/5214903/GM/PatrolNeedHelp.zip

  • I'm no expert. But I would suggest using instance variables to conrol that. Ex- set instance variables for each enemy indicating player spotted, either boolean or numeric with 0 and 1 (open/closed). Then set action/event sequences setting enemy 1's sight to false if enemy 2's sight is true and vice versa.

  • I'm working in a sample for you, maybe tonight I edit this post with it. =]

  • I'm no expert. But I would suggest using instance variables to conrol that. Ex- set instance variables for each enemy indicating player spotted, either boolean or numeric with 0 and 1 (open/closed). Then set action/event sequences setting enemy 1's sight to false if enemy 2's sight is true and vice versa.

    Unfortunely Im not really good with variables, but thankyou for the advice :)

  • I'm working in a sample for you, maybe tonight I edit this post with it. =]

    I figured out that by adding event "Pick nearest" solves the problem construct.net/en

    But I deffinitely will apreseate your ideas to solve it :)

    Afterall,there are many ways to do the same result

  • Here it is.

    You can make your "Detecting area" or use like I did.. =)

    http://dl.dropbox.com/u/47035927/Chasing%20Sample.capx

    http://dl.dropbox.com/u/47035927/Chasing%20Sample/index.html

    I organized in groups and if you need comments in the code, just place another post asking for ^^

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi TELLES0808

    maybe you removed the file but your link does not work anymore :(

    Would it be possible for you to link it again?

    Thanks

  • File deleted a long time ago, sorry.

  • i apologize for the unfortunate missing files of the examples. I cant really even remember if i deleted or moved the files from dropbox but i do plan making new ones that hopefully wont have this issue again

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