ArcadEd's Forum Posts

  • Where in your code are you saving the high score to web storage? I don't see it in the snippet you posted.

    Do you mind posting up a CAPX?

  • As far as I know, if you are building the app with CocoonJS, there is no way to then go into Eclipse and edit it.

  • What I mean is, right now your code is never setting a highscore to the webstorage, so naturally it's 0.

    Maybe this will help if you haven't seen it yet.

              

    Subscribe to Construct videos now
  • Ok, the only place you are setting the high score is on the start of layout. Since varHighScore is 0 at that point, it setting 0 to the webstorage.

    Try creating another Keyboard event to give yourself a score to play around with it. Or 2 keys to give different scores for testing.

  • how do you have it setup to clear the storage? Can you show the code snippet of where you are clearing it?

  • <img src="http://content.screencast.com/users/ArcadEd/folders/Jing/media/bff0c44f-5e9d-4275-8928-51171498acf8/2013-05-27_1952.png" border="0" />

    CountOnes is a global variable.

    I just used the touch event to trigger the for each event, obviously you would use something different.

    You can also just change the current value to 2 to count up the 2s.

  • You can just create an event like On Key Press (pick a key) and for the action, clear local storage or clear session storage.

    Just remove it before you finish up your game.

  • Are you using any 3rd party plugins that cocoon might not support?

  • Seeing your code or capx file would helps us help you :)

  • Well, construct 2 doesn't really define that, I do.

    For me, anything that doesn't start off in the layout I usually create during the game code, so it's not needed. Construct 2 just expects all those object when you load up the game, but once your layout actually starts, they don't all need to be hanging around off screen.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you loading in the high scores from webstorage before displaying them?

  • On start of layout - Destroy all unused objects.

    I do this with almost all of my projects, anything outside of the layout, I destroy it on start of layout, just to clean up before things start.

  • First off, instead you could just use 1 sprite but give it two animation frames. Black frame (frame 0) and white frame (frame 1). Set the animation speed to 0.

    Then do something like.

    On Clicked Object

    --->sprite compare frame 0

    ---------------->set sprite animation frame to 1

    --->else

    ---------------->set sprite animation frame to 0

  • Well in the example the array is only set to store 10 values, so click on your array object and change the WIDTH properties to however many you need.

    <img src="http://content.screencast.com/users/ArcadEd/folders/Jing/media/4767264b-ed28-4753-ac4d-301d0236b9dc/2013-05-24_0740.png" border="0" />