...update a button or text field

0 favourites
  • 4 posts
From the Asset Store
A very simple to set up ZElevation based depth of field system for your game. Fully commented.
  • Hi there,

    So I'm working on a test game to see how i would make a game i'm currently building with gamesalad in Construct2.. so far so good, but i quickly discovered some questions about how to update the state of something..

    i'm making a button toggle when touched. i spawn a new graphic when its touched over the old one (might not be the best way).. but the problem i run into is when i lift my finger or mouse.. i can't figure out how to tell it to do something when released.. in this case display the "off" button graphic.

    none of the actions from what i can tell seem to offer the touch command a "when released" condition to meet, which i'm used to having in GameSalad. I know its possible, its just eluding me.

    i'm also using a global variable that i want to update from 0 to 1 and back to 0 based on if an object is currently being touched or not.. i think that will be remedied as well once i know how to properly track an "upon release" type of condition.



  • That new graphic you spawn, make the event for it trigger once (or however many times you need, or infinitely) on "is not touching" (i.e. use "is touching", invert it).

    When Button touched -> Spawn Button2

    Once when Button2 not touched -> Do crazy stuff

  • Something like this?

    Button Example

    I made this example a while back but it should give you an idea.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • INVERT! that is what i didn't realize i could do in C2.. and Wink awesome example. :) thank you so much. the mouse over extra touch and timer usage is also very helpful!

    now back to it.. part12studios.com/promo/ctf/HTML5



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