Adding an object to a family.*turnabout mode*

Get help using Construct 2

Post » Tue Jun 18, 2013 6:34 pm

THROUGH EVENTS!

Is there any way to do this? If not, is this even on the to do list, @Ashley ?
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,377

Post » Tue Jun 18, 2013 7:06 pm

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 !
B
62
S
26
G
24
Posts: 955
Reputation: 18,320

Post » Wed Jun 19, 2013 9:41 am

Well, I already know this. But, this strategy is not very flexible. That would lag the out of Construct 2 and my project.
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,377

Post » Wed Oct 09, 2013 7:09 am

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
B
10
S
2
Posts: 40
Reputation: 786

Post » Wed Oct 09, 2013 8:26 am

Nope. In what case would you need such functionality?
B
24
S
9
G
7
Posts: 756
Reputation: 7,292

Post » Wed Oct 09, 2013 12:13 pm

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).
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,377

Post » Wed Oct 09, 2013 5:27 pm

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 goLopimp2013-10-09 17:32:00
B
10
S
2
Posts: 40
Reputation: 786

Post » Sun Oct 13, 2013 1:24 pm

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.
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,377

Post » Sun Oct 13, 2013 2:03 pm

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.



I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: emreyigit03, plinkie and 5 guests