Turrets attack target with instance variable

0 favourites
  • 7 posts
From the Asset Store
Warrion on Atack is a very fun survival game. Your goal is to defeat the endless wave of enemies.
  • Is it possible to have Turrets attack only targets with a specific instance variable?

  • You can limit turrets to only target objects from certain families. Just ensure that the family you're targeting contains objects with only the specific instance variable you want assigned.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What is it you are trying to achive? could you not just have two different enemys?

    If you want to do something different with those two different enemys you could just add them to a family.

  • You can limit turrets to only target objects from certain families. Just ensure that the family you're targeting contains objects with only the specific instance variable you want assigned.

    Can you explain how this would work? Can you assign objects to a family at runtime?

  • Taurian

    It is for grouping object types. Not 100% sure on what you want to group with but for example you could assign all objects that have a specific instance variable set (e.g. EnemyType:Beast) and put them all in one family called 'Beasts'. Then you can set the turret to target only objects assigned to the 'Beast' family.

  • Taurian

    It is for grouping object types. Not 100% sure on what you want to group with but for example you could assign all objects that have a specific instance variable set (e.g. EnemyType:Beast) and put them all in one family called 'Beasts'. Then you can set the turret to target only objects assigned to the 'Beast' family.

    Ok,

    I have this object, and during runtime it's Variable, "Type" was set to beast, how do I add that specific one to the Beast Family?

  • Taurian

    I'm not sure you would need families then for that. If your object was imported as e.g. 'PLAYERMAN' you would just create a function : turret target 'PLAYERMAN' if variable type = beast.

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