How do I add the same object to turret targets

0 favourites
  • 1 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • So here's my idea behind this. I've got a sprite with a turret behavior and a private var called faction. Is it possible to add turret targets based on that private var or perhaps based on animation?

    Sprite Ship1, faction: purple (animation purple, random frame)

    • Add all Ship1 sprites, which are of faction red to the turret targets of faction purple

    Sprite Ship1, faction: red (animation red, random frame)

    • Add all Ship1 sprites, which are of faction purple to the turret targets of faction red
    • Or add all Ship1 sprites which are running a different animation as the one I want to add the target to

    family Enemyships.faction != Ship1.faction OR family Enemyships.AnimationName != Ship1.AnimationName

    -> Ship1 Add target (Enemyships) to turret targets

    This seems to add all the ships, because it is family. Including their own faction and itself to the turret target list. Isn't this possible, using just one Sprite container for this...

    In short:

    Can you select two sprites from Ship1 and separate them somehow based on their private var (faction) or AnimationName

    Maybe one more question, is it somehow possible to see a turret's targets in some kind of list?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)