How do I reference a sprite that isn't part of the conditions?

0 favourites
  • 3 posts
From the Asset Store
Smart UI Part 1 by Epic Stock Media is a one-of-a-kind collection of modern user interface sound effects.
  • I am making these wheels that have four platforms on them. If you step on the platforms on the side, it makes the wheel rotate.

    Right now, that sequence is triggered by the player landing, and checking if the player is overlapping a platform. If the platform has the right variable, the wheel turns.

    Unfortunately, I can't get it to work with more than one wheel. I really do not understand what to do.

    I thought maybe a "for each" condition would help, but it still wouldn't know which wheel. I thought maybe I could give the platforms a variable and check if it matches the UID of the wheel, but that isn't working. I'm considering making the wheel have a huge hitbox and just include "is overlapping wheel" as a condition. It just feels hackey.

    Is there a better way that I could reference which wheel needs to turn when the wheel isn't a part of the conditions for triggering the event?

    Link to project drive.google.com/file/d/1a5ltQelW9wZ19qgz-5j9NRk0THOuHSLQ/view

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well you're almost there because you created the platformID variable but never used it and I see you attempted a system condition so that's also in the right place. Where you have the disabled system condition you need to add 'wheel object pick by UID > platform.platformID'. This picks the associated wheel with the platform you just landed on as linked by the variable.

  • Thank you lionz!! You have saved me. There are like three other places in my project where I can use this too.

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