firezombie444's Recent Forum Activity

  • I tried that too but it still doesn't work. This was my post from before that i was talking about: scirra.com/forum/viewtopic.php?f=147&t=127076 What I want is the Money value to go up every time on play because it only goes up after the first time right now.

  • That was just a typo. Someone told me that when comparing two values, convert it into an int() or float() in first.

    I meant when the money system only goes up once, i play one game, then it adds the coins, but then I do it again and the coins just stay the same. It's definetly a problem with the WebStorage because it was working fine before then.

  • I'm not quite sure how to use the "int" behavior in WebStorage. The money only goes up once when I don't but I tried it and it doesn't work. Does this look right?

    int(WebStorage.LocalValue("TotalMoney")) > 0: Set Money to int(WebStorage.LocalValue("TotalMoney"))

    Money not equal to int(WebStorage.LocalValue("TotalMoney")): Set Local Key "Total Money" to Money

    Thanks for any help!

  • Add an anchor behavior to the coins. That way the coins will stay in the same place until the player collides with them.

  • My WebStorage question was about using the int behavior. The mph thing isn't that important right now.

  • Do you mean randomly spawning coins between pipes or making the player's coin amount go up when they collect the coins?

  • Still can't post url lol. here it is. scirra.com/forum/viewtopic.php?f=147&t=127076 Is there a way to earn more rep easy?

  • I'm kind of stuck wondering if there is a way to display mph, since 8direction and bullet speed are way different. Thanks for any help! Also can someone answer my WebStorage question: Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • bump

  • ?

  • So like this? int(WebStorage.LocalValue("TotalMoney)) I added this to all the events and it still does the same thing.

  • At first, my money system was working fine. In my drag racing game, every race, if the player wins add 250 to the money, and add 85 if they lose. Then i added the Webstorage and now the money will only go up after one race. If I try it again, the money won't go up any more.

    On start of layout:

    WebStorage.LocalValue("TotalMoney") > 0: Set Money to WebStorage.LocalValue("TotalMoney")

    Every tick: GoldText: Set text to "" & Money

    Money not equal to WebStorage.LocalValue("TotalMoney"): WebStorage: Set Local Key "TotalMoney" to Money

firezombie444's avatar

firezombie444

Member since 13 Feb, 2015

None one is following firezombie444 yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies