containers and families question

For questions about using Classic.

Post » Mon Oct 05, 2009 5:30 am

I think someone asked something like this a while ago, but couldn't find it.


Basically I have some blue objects which are in a container to a green object. Each blue object is in the blue family and each green in the green family.

Although, when this ball hits the blue object it rotates BOTH green objects - but I only want it to rotate the green object that is associated with the blue one.


here's a .cap if you need to see.


edit: would the pairer be better for this? or is this problem too much for construct's power to handle?
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Mon Oct 05, 2009 7:42 am

I think the problem is that the families are not in the containers
the objects are
and since the families have their own picking SOL
it can't work
whenever my new plugin comes in, you'll be able to do this
and yes, I think pairer could solve this as well
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Mon Oct 05, 2009 2:52 pm

Picking a family via a condition, then performing an action on another family that's also in a container doesn't work. Ashley said the bug goes way too deep, and probably won't be finxed until construct 2. I got around it by giving everything a pv 'uid' and checking that.

So one object per container would need a setup event:

at startup
for each sprite (blue family - picks the others in container)
- set sprite (blue family) value 'uid' to sprite.uid
- set sprite2 (green family) value 'uid' to sprite.uid

Then

If ball overlaps blue
Green value 'uid' is equal to blue value 'uid'
- actions

Slightly more complex, but it works.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Wed Oct 28, 2009 1:36 am

I didn't notice your post before Arima, but that looks like an easy/simple way to get it to work. Cheers!
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests