Shack's Forum Posts

  • I personally use Format Factory to convert audio files..You can convert Wav files to Ogg and import in game..

    Thanks, I just tried it but still having the same issue. It seems to only happen to certain files so I think it has to do with these not being PCM .wav. Is there a setting in FF that lets me change the .wavs to PCM?

  • Hi, I imported a .wav file to use in my game, but it gives me an error saying "converted to AAC, but failed to convert to OGG". From here I added my Audio Object, but whenever I use the Play command it tells me that I do not have any audio and that I should import some. However, I clearly see the .m4a's in my Sound folder. I tried rendering out my sound with different compression formats and it still wont work.

    How can I get this audio working?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Using web storage you just store anything to the key, so if you stored something under the key ('highScore') , you can then use the functions provided to get whatever is stored in that key, the 'key' can be anything you choose as its name.

    However, if you are looking to implement a 'high score' table that other people can view (so the scores are global if you like and everybody can see / try and beat them) , the web storage is not what you need as its limited to the person playing the game only.

    Anyways... I dont know if I have explained very well, but here are 2 tutorials that might help you, the first one is about making a high scores table using web sotrage

    https://www.scirra.com/tutorials/448/ar ... high-score

    And this second one is to do what I mentioned earlier and make a high scores table available to anybody who plays from any device.

    https://www.scirra.com/tutorials/346/on ... -php-mysql

    In my tutorial Asteroid clone in less than 100 events's score system, I show you a way to sort your score within an array before saving it to webstorage all at once.

    You can adapt the array sorting to only pick the score you are interested in and then save it as its own individual webstorage key.

    Thanks guys. I should have given more information. I want the high score to be local and only show the top score achieved by the player, but replace it when the player beats it. Thanks for the links, I will check those out and see if they work for me!

    EDIT: I followed the first tutorial and it works great! Thanks a lot!

  • Hi, I have tried following multiple tutorials, but they all seem to include way to many variables or don't address all of my questions. I want to save 1 high score and replace it if the player beats it.

    https://www.scirra.com/tutorials/266/we ... nformation

    I tried this, but am unsure of what variables I need to define and what Webstorage automatically handles on it's own. It says "HighScore" but is that a text object, variable or neither?

    Thanks

  • This is a CapX for those who want to save variables, it will just show you a way of doing it using the Web Storage plugin.

    Aimed at new comers to C2

    Tested in Chrome and works fine.

    There's probably a better usage of this plugin, but i couldn't find alot of info about it.

    Save Game Test CapX

    tonycrew2011-11-13 02:32:42

    What is MSave? Is that ever defined in the project or does Webstorage just create MSave as a variable in it self to load later?

  • Shack You have all the control... do a test and, if you find any difficulties, just tell me

    I don't fully understand how set vector Y works to create a horizontal jump. Also when i use the platform behavior, the character only jumps when it is touching a platform.

  • >

    > >

    > >

    > > You need to use "Is Touching Object" instead, which is a condition rather than a trigger.

    > >

    >

    > It worked perfectly

    >

    > While you're here, can you answer this too? I only want the player to move a little bit, similar to a Jump in the Platform Behavior. Is there an easy way to do this or should I just set a Platform Behavior and rotate the player depending on the direction they tap?

    >

    The easiest way to do a 'flappy bird type of movement' is using the platform behavior... with the 'set vector y' action you can do the "jump".

    I will mess around with that. That will let me control a side to side motion right? Not just up with gravity pulling me down.

  • You need to use "Is Touching Object" instead, which is a condition rather than a trigger.

    It worked perfectly

    While you're here, can you answer this too? I only want the player to move a little bit, similar to a Jump in the Platform Behavior. Is there an easy way to do this or should I just set a Platform Behavior and rotate the player depending on the direction they tap?

  • The "On Object Touched" event is a trigger, indicated by the green arrow in the event. A trigger will only fire once when the condition is true, then it will not fire until it becomes false and then true again, they do not fire every tick while true.

    You need to use "Is Touching Object" instead, which is a condition rather than a trigger.

    Ahhh, Thank you! I will try it tonight. I guess I should read the entire manual :/

  • i have a little sample idea:

    Add "Touch" to your game and in on touching event of the "fruit" add an event that destroy the fruit and spawn another splitted intance of it and don't forget to add a fade effect.

    Won't that use more of a Tap versus and Swipe? I am curious.

  • Hi, I am trying to set up a horizontal movement that is controlled by tapping on the left/right side of the mobile screen. Right now I have 2 full screen buttons, one on the left and one on the right. I set them to OnTouch > BTN > Simulate 8 Direction Left/Right. When I test the game and click the touch buttons, it only moves the player over by 1 pixel no matter how many parameters I adjust.

    I am definitely missing something because the left and right keys on the keyboard work just fine, but for some reason touching the buttons does not.

    My goal is to get movement similar to Flappy Bird, but their will be gravity and the player can tap the left or right side of screen in order to boost/jump in that direction a bit.