Adding an object to a family.*turnabout mode*

0 favourites
  • 9 posts
From the Asset Store
Kids Game
$24.50 USD
50% off
New Sounds Added Update: 115 new sound effects added for no additional cost!
  • THROUGH EVENTS!

    Is there any way to do this? If not, is this even on the to do list, Ashley ?

  • In the meantime, add to families every object that are succeptible to be a part of them. Add a family instance boolean "familyActive". On all events that affect families, only pick family instance that have their "familyActive" set to true. Tedious, but effective ! <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Well, I already know this. But, this strategy is not very flexible. That would lag the <img src="smileys/smiley35.gif" border="0"> out of Construct 2 and my project. <img src="smileys/smiley18.gif" border="0" align="middle" />

  • Hi,

    I am raising up this post as I would also be interested in the possibility to manipulate objects within a family dynamically through Events.

    Is there a way to add/remove/ clear object from a family?

    Thx

  • Nope. In what case would you need such functionality?

  • Well, for example, I have an enemy, and a family called "Pushers" that push the Hero when he touches them. On certain conditions, I want to add that enemy to the Pushers group. That's just an example, I forgot why I needed it then( it was such an early stage of development).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    I am still working a really basic stuff, so far I am working on a puzzle game.

    I have two families :

    • pieces (where I store puzzle pieces)
    • placeholder (where I store the placeholder where the piece should be placed)

    When I had one puzzle it was fine, but as I want to have multiple puzzle, i'd like to only have the pieces and the placeholder of the puzzle the user is playing with.

    My idea was to empty both families on layer start then add the pieces and placeholders of the current puzzle only.

    So that way I could keep only one Events page to deal with the logic of the drag and drop of pieces into placeholder.

    Now I am working on making it work with a family instance variable isActive for pieces and also one isActive for placeholders families.

    I am still on my way and I am not sure I'll be able to finalize all.

    So far it's fine for pieces, but I am still struggling with the 'set active' of placeholders of my current puzzle only.

    What I feel now is that it's a quite chaotic work around and that having action to add and remove items from families would be clearer and a more structured way to go

  • What this Lopimp said, and now imagine that I have like 8-10 families. I just wonder if it's on the to-do list, ASHLEY.

  • I'm still not quite sure what the benefit would be of being able to do this.

    Construct2 has containers, grouped events, families, instance, local and global variables, which could all be put to use to create the desired conditions.

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