How do I unpin one sprite from a chain of pinned sprites

0 favourites
  • 4 posts
From the Asset Store
Wall Pin Board is a hyper causal game developed for fun and inspired by YouTube video whose link is given in description
  • HI guys,

    I'm using one sprite (ball shadow) pinned to another (ball itself), and the ball pinned to a backgroung image sprite. What i'm trying to achieve is when the user clicks on the ball, it falls down and roll around.

    The problem is when i use unpin to unpin the ball from the background sprite it also unpin the shadow from the ball... i wish i could unpin the ball from the background sprite, but not the shadow from the ball.

    Is there a way to do that?

    Thanks!

  • The problem is when i use unpin to unpin the ball from the background sprite it also unpin the shadow from the ball... i wish i could unpin the ball from the background sprite, but not the shadow from the ball.

    The problem is that when you run the event, it will run the event for every instance of the object the fits the condition. It will do this unless you tell it to do otherwise.

    Every individual object has a unique UID. If you click on the ball and find out what it's UID is, you can choose which specific instance of an object you want to unpin. Just go to the conditions list and add the condition that says pick by unique id.

    There is also the possibility of adding a second object that is the shadow and pinning it to the ball. That way you can unpin the ball without unpinning the shadow.

    There is also a third possibility, and undoubtedly the best solution, is to not make a specific object to be the ball at all and just create a Shadow Light. Add the shadow caster behavior to the ball and you have a shadow. Just remember that shadow is on the same layer as the light, so putting the light on the highest layer puts the shadow above everything, while putting it on the lowest layer puts it below everything.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Unpin, and directly re-pin those you need again. You can not unpin from any selected/not selected object.

    But. A falling ball sounds as physics to me. Then at least one pin is not needed, well not wanted even.

    https://www.dropbox.com/s/6m8wxbm0x9y47 ... .capx?dl=0

    Shadow is in a container with a ball.

  • 99instances2Go - really thank you for the capx and ideas, i appreciated and learned new things! Your solution, i think, is the most affordable one in my game's scenario.

    DerpyDev - i also appreciated you suggestions, Didn't tried it yet, but i will. Wonder why we can't specify the object to unpin, as we can do with the pin behavior.

    Best regards!

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