metalslug87 Posted July 1, 2016 Share Posted July 1, 2016 hello, I am searching for effective way of ladder climb for player like in old Loder Runner game for NES :). I already have only simple script in Update function, if the player overlaps 2 hidden objects on both sides of the ladder he gains the ability to climb. In fact it's hard to accurate get the player at the center point of ladder to climb it. Any Ideas ? if (playerTouchLeftLadder && playerTouchRightLadder) { console.log('overlaps ladder'); if (cursors.up.isDown) { player.body.velocity.y = -75; playerGravity = 0; player.frame = 9; onLadder = true; }else if (cursors.down.isDown) { player.body.velocity.y = 75; playerGravity = 0; player.frame = 9; onLadder = true; }else if (playerJumpState == false){ player.body.velocity.y = 0; } }else{ playerGravity = 500; onLadder = false; }; Link to comment Share on other sites More sharing options...
Milton Posted July 1, 2016 Share Posted July 1, 2016 My first Phaser game was Lode Runner Retro (flash version) I assume you're using tiles. So you just check if you're on a ladder tile. No need for hidden objects, or to be centered. drhayes 1 Link to comment Share on other sites More sharing options...
metalslug87 Posted September 20, 2016 Author Share Posted September 20, 2016 thanks :), do you know how to detect an event when whole player body intersects with ladder tile ? Not only part of it ? Like in the attachment here below: Link to comment Share on other sites More sharing options...
Recommended Posts