Make turrets ignore specific instances

0 favourites
  • 5 posts
From the Asset Store
Help the rabbits to eat as much as they can and ignore the bombs!
  • Hello all,

    I have certain things in-game which cause my enemies to be invisible to turrets. It only happens to 1 instance of an enemy sprite at a time. How can I make turrets ignore these instances? Turrets currently always target a family composed of the different enemy types. I tried line of sight work arounds but meh doesn't really work.

    Thanks!

  • You might need to use "acquire target" instead of "Add object to target".

    It's more work, but this way you have more control. So your event may look something like this:

    Every 1 second

    For each turret

    ..If turret doesn't have target

    ....Pick enemies that are in range and visible

    ......Pick nearest enemy to Turret -> Turret acquire target Enemy

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks. Hadn't thought about doing it that way around. I guess "invisible" was not the best way to put it since that is a technical term. Technically the instance will be within range of a turret at all times and will still be visible but will be interacting with another Sprite. I would like the turret to ignore this instance even if it's the closest target and is visible. Is there a way to target instances with only a certain instance variable? It's a knotty problem.

  • You can pick Enemy instances by any conditions you want (you can measure distance to the turret, check if it's in LOS, compare its instance variable etc). And once you selected the suitable instance, you "feed" it to the turret using "acquire target" action.

  • Oh ok, I'll fiddle around with that. Thanks! I guess I just wasnt very well versed on the acquire target vs add target.

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