Clicking outside layer

0 favourites
  • 12 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • So I have a layer and on that layer is a scroll picture. When I click on settings it pulls up the scrolls. But my question is, can I make an action happen when I click outside the scroll. I highlighted in black to show that if I click around here it will do something. If I can't do that, I want to lock the layer with the settings button so I can't keep clicking it and it starts glitching. In the red is the settings button. I can still click on it and I don't want to be able to click on it. Once I click the back button, then I can click settings again. photobucket.com/user/kinglimberg1/media/settings%20thing_zps84lbcd7o.png.html

  • The layer covers the entire layout, you could have it do anything you want when you click out there by simply putting an invisible sprite trigger out there.

    As far as making buttons so they can't be clicked when the layer is open, in my space shooter in my sig I use two methods for my store menu and options page. I have some that are turned off via variable once pressed, ie in my on clicked event I have it set a variable to "clicked" and I condition out Clicked=0 in initial on clicked event. Then when you want it available again simply turn it back on by setting variable to 0.

    If you have many buttons you want to turn off (ie. my entire store is a hidden layer on main layout) just put their event coding into its own group and activate/deactivate the group when the layer is visible.

  • Which one should I look at Lordshiva1948?

  • file name King Limberg

  • Yes, there are like over 50 of them. Which one do you want to direct me to?

  • King he told you the one to download the one called King Limberg. I Copied the direct link to the file it's below

    https://www.dropbox.com/sh/eioscti86bpr ... .capx?dl=0

  • Thanks for pointing out volkiller730. I did say file name is King Limberg

  • I'm sorry about that. I didn't know you named it "King Limberg." Thank you for making that .capx file for me. I guess I will try to figure it out but thank you for much for helping. I appreciate it. In your .capx , I don't really understand whats going on except what is in the event sheet but anyways thank you for your help. I sorta know what to do though. If I have a global variable and have the default value 0 and when I click on something, it sets all the other buttons to 1 and then the back button makes them 0 again. This would be another condition when you touch it. I am still testing it out. Thank you very much for your help.

  • Is there like a way you could like lock a layer on the event sheet?

  • King Limberg You most welcome That I have not tried it therefore I am in dark about that. I never need it so I never bothered. I will find out. If you find out let me too please.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I figured it out! You will need one global variable called whatever, I chose clicked. You have system clicked = 0 as another condition from when you touch the button. When you touched it and it pulls up, it sets the all the buttons global variables to 1 as an event. When you click the back button it resets all the global variables to 0. I hope this makes sense.

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