R139 Family with Turret Behavior

0 favourites
  • 8 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • Link to .capx file (required!):


    Steps to reproduce:

    1. Add two object sprites (Turret1 and Turret2)

    2. Add those two into a Family (Turrets)

    3. Add turret behavior to the family

    4. Add instance variable to the family(TargetType-number)

    5. Change the family instance variable of Turret1 to 0 and Turret2 to 1)

    6. Add two object sprites (Target1 and Target2).

    7. On start of layout, Turrets with targetType=0 assign target to Target1 while Turrets with TargetType=1 assign target to Target2.


    8. On start of layout just assign Turret1 to target target1,Turret2 to target turret2.

    Observed result:

    When you add an object to target to a "Turrets" family, all of the Turret will target all objects, it will ignore the targetType condition.

    (I dont know if this is intended or not)

    Expected result:

    Turret1 in family (Turrets) with TargetType=0 will target Target1

    Turret2 in family (Turrets) with TargetType=1 will target Target2

    Browsers affected:

    Chrome: no

    Firefox: no

    Internet Explorer: no

    Operating system & service pack:

    Windows 7 SP1

    Construct 2 version:


  • UP

    I've got kind of the same problem.

    I have a project, where all the units are in the family(UNITS) but got a variable "Side"(1 or 2) to different Allies from Foes. Family(UNITS) got a family turret behavior.

    What am i trying to do is on creation of any instance from UNITS family it is given the different target to the turret behavior based on the Side variable.

    So when UNITS was created and Side = 1, add one type of targets to it

    When unit with side = 2 was created, add another object to the targets.

    In result it adds the target of the last created unit to ALL of the UNITS instances in game. So on creation of the Side = 1 unit, all of the UNITS, both sides are given the target meant for only the side = 1 units.

    I even try to use "Pick by comparison" condition to pick only units with set side, but the result was the same.

  • Yup. I think its a bug in turret behavior when use with family. No response from scirra yet though.

  • This is currently by design; the target types apply to the behavior type. Since you have a family behavior it means all the objects in the family share the same target list. I can see how this isn't ideal, though - maybe we can change it for a future release.

  • Thanks ASHLEY.

  • Just a little ping for this thread. It is still an issue.

    A simple .capx of it:


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I realize these bug reports aren't actively monitored once closed, but I'd also +1 for changing this for a future release.

  • This is an old post, but I believe I'm experiencing this issue right now. If it's by design, it's flawed design, what is the workaround? I'm trying to have turrets only target objects on teams other than it's own team.

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