TylerJS's Recent Forum Activity

  • It's because of Construct's top down structure so every event becomes true for one click if they have enough money. You can add a short wait of 0.1 seconds in, before you set the upgrade variable.

    Thank you very much, helped a lot.

  • Hi, so right now I have:

    UpgradeAmount - Amount of times it's been successfully upgraded (when clicked, if had enough money then do this etc)

    Money - The balance

    UpButton - The upgrade button, when clicked it'll determine whether or not the player has enough money and will continue if so.

    And right now I have it setup like this

    ___________________________________________________

    On touched object "UpButton"__|___System | Set Upgrade to 1

    System | Upgrade = 0___________|___Subtract 30 from Money

    Money >= 30____________________|

    ___________________________________________________

    On touched object "UpButton"__|___System | Set Upgrade to 2

    System | Upgrade = 1___________|___Subtract 100 from Money

    Money >= 100____________________|

    ___________________________________________________

    I have it setup like this because I want the upgrades to go 1 by one, however right now if they have enough money for the next upgrade

    it buys as many upgrades as it can. How can I stop this?

  • It is there, I think you are looking for it through the actions (the left side of the event is for conditions, the right side for actions).

    Conditions:

    System > Compare variable

    System > Every X seconds

    Actions :

    System > Add 1 to balance.

    Oh my, I'm an idiot! Thank you. I wasn't even thinking about it like that way. Such a simple mistake that I would've never had to ask, if I just thought about it..

    Thank you though!

  • Try Construct 3

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

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

    Launch the game in 'Debug mode' and scroll down and find your variable. Is it behaving like you expect it to?

    If you want the loop set up like that you should use something like

    Variable =1

    Every 'X' seconds - Add amount to balance

    That will loop as long as the variable is 1.

    There isn't an option for Every X Seconds.

    I have it setup using

    System > Status = 1 | System > Wait Seconds

    System > Add 1 to balance

  • Hi, so right now I'm in the process of creating a loop in a different way.

    So I have a start and stop button for this, right now whenever the player clicks start:

    The global variable will go to 1

    While the global variable is 1

    Wait this amount of seconds

    Add this amount to balance

    Repeat

    I'm having a hard time getting the repeat to work, because right now all it's doing is

    Waiting the amount of seconds

    Continuously Adding amount of balance without the wait after first time.

TylerJS's avatar

TylerJS

Member since 23 Oct, 2016

None one is following TylerJS yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies