Select an object without selecting whats under it

0 favourites
  • 3 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • (Solved!) ;D (not a simple solution but I can understand why it is the way it is.)

    Hey all,

    Im stumped on what seems like a simple interaction and could definately use some assistance.

    I just cant seem to figure out how to click on an object without clicking whats behind it as well. Is this even possible?

    db.tt/8P56nb0x

    Here is a link to an example, you will see that Im trying to select my object (blue ball) using the mouse. After selecting it I then want to be able to click somewhere on the field for that ball to head towards.

    The problem is when you click the ball you also click through the ball and hit the ground.

    Thoughts anyone?

  • Just swap the order of the events, so it checks for ground click first before it selects the sprite.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey ramones,

    Thanks for the quick response. That is a good idea and something I tried but the problem comes into play again if I want to select a second ball before I issue my move command.

    Instead of just selecting the ball as well, it also selects the ground object beneath the ball.

    I can make things easier by using right click for movement and left click for selecing but I was just wondering if it was possible to only click on the top object.

    (Just wanting to keep it simple and also keep the door open for a touch version in the future.) The only work around I can think of is to have a seperate move button pop up when I select a ball but that kind of makes things clunky.

    Any ideas?

    Ahh I can select only the ball by inverting a "cursor is over ball" condition in my moving command, problem solved.

    Now to find a way to deselect a selected ball by clicking on it again before it moves. Variables should do the job.

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