DV7's Recent Forum Activity

  • It works! Thank you so much for taking your time to help me out!

    Cheers :)

  • you did

    Set the local key WebStorage.LocalValue("highscore") to score

    you should do:

    Set the local key "highscore" to score

    Like this?

    <img src="http://i44.tinypic.com/nm0s92.png" border="0" />

    If that is what you meant, that doesnt work either. highscore stays at 0 :(

    Or I might have missunderstood you again :P

    If so, could you send me .capx with how you have done via PM?

  • But... didnt I already do it in the provided .capx?

    <img src="http://i42.tinypic.com/331fthl.png" border="0" />

    edit: Or have I completely missunderstood you?

  • The problem is your "set local key"

    you just have to enter the name of the key, here "highscore" (with the " " ), not the WebStorage.LocalValue("highscore")

    Uh, sorry if I seem stupid now, but I dont get what you mean :P

    Do you mean event 13? WebStorage.LocalValue("highscore") ?

  • Ive PM'd you with the .capx file. Please oh please find the problem :/

  • I've added the " ", but the highscore still remains at 0 :(

    I can give ya the .capx if you want to try it yourself?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for replying! Does not work on either computer or device (Samsung Galaxy S3) after export with CocoonJS.

  • Howdy!

    So, Im pretty much done with my first (android)game ever, the only thing missing is highscore.

    I started on that part back on friday, but couldnt make it work, so I left it for saturday and after another failed attempt, I told myself that I'd fix it today but Im still stuck after some hours of messing around trying to fix it :(

    The problem is that the highscore either stays at 0 or says NaN, and I cant figure out why. Ive been searching for tutorials, but pretty much none of them are based on how to store highscore locally on the device. I found a video (https://www.scirra.com/tutorials/448/arcade-style-high-score) though and Ive done the steps over and over but it simply does not work and its driving me nuts!

    <img src="http://i40.tinypic.com/29y4kk0.jpg" border="0" />

    Any idea of where Ive done wrong? If the screenshot is not enough, I can provide .capx file too..

    Thanks in advance.

  • In C2, a 0 degree angle is to the right, and rotates clockwise. Your cannon sprite points up at 0 degrees, and that's causing the confusing. Try rotating it 90 degrees to the right:

    <img src="http://i.imgur.com/lvRQ4eL.png" border="0" />

    Thats it! Got it to work.

    Thanks a ton for helping me out!

    cheers :)

  • > poops out the bullets

    :D

    Just change the angle to that of the cannon. E.g. Set angle -> canon.angle

    Sorry if I seem retarded, but I dont get it <img src="smileys/smiley17.gif" border="0" align="middle" />

    Anyhow, I've solved the aim-to-the-opposite-direction-problem but could you explain (or anyone else that would like to help me out a little) why the bullets are going to the side, and how I can make them go normally?

    (hold the left mouse button down to rotate the cannon, press space to shoot)

    .capx: dl.dropboxusercontent.com/u/11888452/weirdbullets.capx

  • Try using 2 image points, one closer to the cannon holder and the other one that poops out the bullets. The closer to the cannon holder point is the origin and is rotating to the mouse.

    Ok, that part is working now. Thanks a ton!

    Now I just need to figure out how to make the aim-thingy work. Do you happen to have any idea on how to make that work? Ive changed my mind a little, I'll have the mouse on "every tick" instead of holding the button down, it is easier that way, but I still dont know how to make the cannon to face the opposite direction of the mouse...

    EDIT!: Oh, after a second, I noticed that the bullets arent traveling where they are supposed to (where the cannon aims), but to the side :(

    EDIT2: aha, managed to solve that part.

  • Place an image point at the end of the cannon and make the canon holder a separate unmovable sprite. Gee, in this forum, the questions are either this, either a person who can't use global variables either a pile of mathematics bullsh*t I can't read! This is a real mess.

    The cannon-holder is already a separate sprite.

    And Ive already tried with placing the image point at the end of the cannon, where the bullets should come out from, but when I do that, the cannon wont be stuck to the holder, which is what I cant get to work, along with the aiming.

DV7's avatar

DV7

Member since 7 Apr, 2013

None one is following DV7 yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies