Jump to content

Search the Community

Showing results for tags 'movement sound'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hello, I am completely new to Phaser and have just been mucking around with a simple platform canvas and character. I was able to add music and a 'boing' sound for when the character jumps, however, I cannot figure out how to approach adding a walking sound properly when the character walks left or right. With the code below it plays the sound over itself on every update call so when the key is pressed down it just comes out as a loud 'blaarrrrrrr' I have been searching the forums, examples and documentation but just haven't found anything... Does anyone have any tips or pointers they could throw my way? Here is how I load the sound: foot = game.add.audio('foot',1,false);I added the sound in the move left keyboard detection which plays my sprites animation and moves him: if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) { // Move to the left player.body.velocity.x = -200; player.animations.play('left'); foot.play('',0,1,false); }Should I be setting up the audio in the animation setup under the create function OR should I limit the amount of times it gets played? sorry I am just a lost beginner! Thanks in advance. Specialspam.
×
×
  • Create New...