How do I change the functions on the same button?

0 favourites
  • 3 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • Edit #2. Solved thanks to plinkie, I leave this post as it is if any other users in future google and find this.

    So I have a button that will scale the game if the user wants a smaller / bigger layout size,

    I want to use the same button to change the scale again, so if the player presses on the button first time,

    The game will scale like this above,

    then if they press the button again, the game will scale back to 1.0

    So first time they press, the game will scale in making it smaller, then this gets disabled and the other one gets activated so if the player presses again, the game will scale back. over and over

    How do I do this?

    Extra note, I cannot use 2 different buttons (That change collision, it needs to be the same button)

    so an example how I want it to look (This dosent work)

    Edit #1.

    This code actually works, but only 1 time

    I guess it's because the signal has been called which makes it's perm active, is there a way to reset it so it waits to get called again?

    [quote:11mckudd]Signal

    Resume any events paused with a Wait for signal action with the given tag.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I use variables for this, on the button itself or global. You can toggle a boolean true or false if they are the only two button options.

    On button clicked, if variable = true, Set layout scale to 1.5. Else set layout scale to 1. And on button clicked, toggle boolean.

  • I use variables for this, on the button itself or global. You can toggle a boolean true or false if they are the only two button options.

    On button clicked, if variable = true, Set layout scale to 1.5. Else set layout scale to 1. And on button clicked, toggle boolean.

    Why didn't I think of this before! Thanks

    It works, thanks!

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