Jump to content

Search the Community

Showing results for tags 'walk'.

  • 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 2 results

  1. Hi, I'm programming a simple platformer game, and I'm programming and setting the movement of the player. Here's my update function: update: function () { game.physics.arcade.collide(this.player, this.platform); game.camera.follow(this.player); if(this.cursor.right.isDown){ this.player.body.velocity.x= 200; this.player.animations.play('correr', 5, true); this.player.scale.x=1; } else if(this.cursor.left.isDown){ this.player.body.velocity.x= -200; this.player.animations.play('correr', 5, true); this.player.scale.x=-1; } else if(this.jump.isDown && this.player.body.wasTouching.down) { this.player.body.velocity.y= -400 } else if((this.cursor.right.isDown || this.cursor.left.isDown) && this.jump.isDown){ this.player.body.velocity.x= 200; this.player.body.velocity.y=-200; } else{ this.player.body.velocity.x = 0; this.player.animations.stop(); this.player.frame = 4; } } Everything works fine, but in my last else if is suppose that the player should jump and walk, but it doesn't work! My intention is the player could jump while walking pressing the jump key + left or right key, for now I just can jump first and then walk. I don't know why this las if else it isn't being executed, because I tried to move it in the first if clause and it worked perfectly, but I can't realise about the error. Thanks for helping.
  2. Can any help me ,how to make our FPS Camera (Free camera) to walk on steps
×
×
  • Create New...