DV7's Forum Posts

  • 15 posts
  • 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?

  • 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.

  • Hello! I have encountered yet another problem while making my pretty simple game. Usually I manage to solve the problems I get, but Ive been stuck now for a hour or so messing around in the event sheet, behaviors etc, so it would be nice if I could get some help here.

    As the title describes, I simply cant make the cannon aim the way I want it to. I've done the first tutorial on the website, where you make the player(gun) aim where the mouse is, but that does not work with what I am trying to do now.

    To start with, I'd like the cannon to be stuck to the cannon-holder when it rotates. I thought I made it work by placing the image-point on the lower end on the cannon, but when I do that the bullets comes from the same spot, so it doesnt look right. If I place the image-point at where the bullets should come from (as we learn in the first tutorial), then the rotating looks weird. (you'll understand better once you take a look on the game and the .capx file).

    Then I'd also like the cannon to face the other side of the mouse instead of looking towards it. So, if my mouse is on the right side of the cannon, the cannon will aim left. If the mouse is on the left side, the cannon aims right. If the mouse is under the cannon, the cannon aims upwards and so on. And the last thing is that, I want it to do that only when I click on the cannon (and/or on the cannon-holder) and hold the button down. But I cant find that option under the conditions in mouse.

    Any idea on how I can make it work? <img src="smileys/smiley29.gif" border="0" align="middle" />

    .capx file: dl.dropboxusercontent.com/u/11888452/cannon.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do Man1 and Man2 have to be different objects? dl.dropboxusercontent.com/u/8367729/construct/example/shootRandomMan.capx

    I tried the CTRL+drag to copy the object and when I did that, there was no randomness at all. Every bullet went on the same guy, I had 3. Might have messed something up on the event-thingy back then.

    Thank you so much for helping me out! :)

  • Hello! I am trying to create a basic game where the enemy is supposed to shoot at 2 soliders. I want the enemy to shoot randomly on either Man1 or Man2 (the 2 soliders), but the problem that I have encountered is that the enemy is not aiming properly. The bullets seem to be going at random directions and I cant, for the sake of my life, figure out how to make the enemy aim on the targets only. I have been searching for tutorials that might descirbe how to do it but with no results.

    And also, how do I make the enemy stop after both targets have been destroyed?

    The .capx file can be downloaded at dl.dropboxusercontent.com/u/11888452/solidershot.capx

    Thanks in advance :)

  • 15 posts