How do I pick one object for correct and all others for incorrect?

0 favourites
  • 3 posts
From the Asset Store
Pick Up Items Sound effects for your game, Take them for a ride right now and you will worry no more.
  • Hi everyone,

    Imagine a series of boxes, and you have to drag a key over to the correct box (by guessing). Each box has its own UID, of course, but bear in mind that this is for a student, so it's the free version only. I have a feeling this kind of thing would be easier with families or something...

    Anyway, he wants it to go to a win screen if you choose the correct box, but a lose screen if you choose any of the other boxes. It sounds simple, but I honestly can't work out how to do it besides with every bit of that code laid out, which is a little ridiculous.

    Is there an easy way? Thank you very much in advance for your help!!!

    Watto

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Very simply : kyatric.com/c2/capx/2018.11.1.drag.drop.help.capx

    Use instances and instance variables.

    On start of your layout set one of your box instance variable to true, it will be the winning box.

    If you want it to always be the same, set the instance variable in the editor and not dynamically.

    On drop of the key, if the box it is being dropped on is the winning box, go to the winning layout. Otherwise, go to the other.

    If you drop the key somewhere else on the screen, put it back in its original position.

  • Thanks very much, mate!

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