0 Favourites

containers and families question

This forum is currently in read-only mode.
  • 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.

    <img src="http://dl.getdropbox.com/u/1024727/familyisi.PNG">

    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?

  • 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

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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.

  • I didn't notice your post before Arima, but that looks like an easy/simple way to get it to work. Cheers!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
353 32,097
yojona's avatar
yojona
Unread sticky
192 1,337,449
Kyatric's avatar
Kyatric Construct Team Support
Unread hot topic Locked topic
67 21,585
Ashley's avatar
Ashley Construct Team Founder