Differenciate between instances

0 favourites
  • 4 posts
  • here's my problem: I'm trying to make a system where each enemy has a Line of sight field and when the player they react to it as long as the player stays inside, atm i've been able to make it work for any given enemy as long as there isn't more than 1 enemy with the player inside its LoS field. The thing is I'm using the "is colliding with" condition to detect the player inside the field, and since it can't differenciate between each instance, as long as the player stays inside ANY field the condition will return true.

    Any help would be appreciated.

    PS: I can't use the "pick" conditions because I need it to be able to work with more than 1 enemy at the time.

  • Need more info on how you're dealing with the LoS field. Is it it's own sprite? If so, then you want to use a container

    If you put the sprite you're using for your detection field in a container with the enemy sprite...when a specific field is picked, it will automatically pick the enemy in that container.

    If you're going about it some other way, then you'll need to provide us with a capx or some code to look at.

  • I too would like to see a capx on this as I think it is the same issue I will bump into for a future project I have in mind.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Need more info on how you're dealing with the LoS field. Is it it's own sprite? If so, then you want to use a container

    If you put the sprite you're using for your detection field in a container with the enemy sprite...when a specific field is picked, it will automatically pick the enemy in that container.

    If you're going about it some other way, then you'll need to provide us with a capx or some code to look at.

    that's exactly what I needed... sorry I didn't include the .capx, will do in future posts, tahnk you for the fast response

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