How to disable sprite

0 favourites
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • i have two sprite button in the same position when i click the button(top) it will click too the second button(back) how to fix that?

  • You can add an instance variable to each button that uses boolean value - then toggle on/off for the button to be enabled or disabled.

    ~Sol

  • You have an example?

  • You can add an instance variable to each button that uses boolean value - then toggle on/off for the button to be enabled or disabled.

    ~Sol

    its not working for me i set already in boolean=false and still clickable

  • You need to add the boolean value to the condition of the click...

    Mouse clicked on button

    Boolean value = true

    ---- do stuff

    Mouse clicked on button

    Boolean value = false

    ---- do nothing

    You will need to upload your capx or make a simple version of what you're trying to do, so I can edit it to work. I'm not exactly sure about the method or placement of your buttons, so making an example probably won't help if I don't make it the same way you have it set up.

    ~Sol

  • You need to add the boolean value to the condition of the click...

    Mouse clicked on button

    Boolean value = true

    ---- do stuff

    Mouse clicked on button

    Boolean value = false

    ---- do nothing

    You will need to upload your capx or make a simple version of what you're trying to do, so I can edit it to work. I'm not exactly sure about the method or placement of your buttons, so making an example probably won't help if I don't make it the same way you have it set up.

    ~Sol

    i cant post links

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just add an instance variable id to your button's, set the first button to id 1, second to id 2, when you make your event, add button compare instance variable id 1 for the first button, 2 for the second, and it will work like a charm.

  • sorry i dont get it please make a sample capx

  • Just add an instance variable id to your button's, set the first button to id 1, second to id 2, when you make your event, add button compare instance variable id 1 for the first button, 2 for the second, and it will work like a charm.

    sorry i dont get it please make a sample capx

  • Sure, here it is.

    dropbox.com/s/5dluuathupbx0m2/button_click.capx?dl=0

    edit: I changed the link, it should work now.

  • Sure, here it is.

    https://www.dropbox.com/s/5dluuathupbx0 ... .capx?dl=0

    not found <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad" />

  • whats the file name ?

  • Sure, here it is.

    https://www.dropbox.com/s/5dluuathupbx0 ... .capx?dl=0

    your links not found

  • hm for some reason construct forum changed the link, here's the new one, sorry for that.

    dropbox.com/s/5dluuathupbx0m2/button_click.capx?dl=0

  • hm for some reason construct forum changed the link, here's the new one, sorry for that.

    dropbox.com/s/5dluuathupbx0m2/button_click.capx?dl=0

    dropbox.com/s/w2chk5fyfqgu4qp/sample.capx?dl=0

    i think its different, see my capx

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