platform/actor & jumping
paulofuertes
Member Posts: 24
Hello all,
after looking around and trying all I could, i don't think I'm getting somewhere
I have two issues:
1. I made the double jumps, and they do work fine (I think):
- if I double tap quick, it jumps abit high, but thats fine!
This is the problem:
if I tap (1jump) and then when the actor is falling (almost touching the platform) and I tap again for the second jump, it barely jumps (maybe 1 pixel up?)
[this is what i have]
----------------------
game.Jump =0
actor: jump button
if gamejump <= 2, then change attribute game.jump to game.jump+1
actor: player
gravity 270 down, acc 400
rule. if collides with wall,change attribute game.jump to 0
rule. if game.jump = 1, change attribute motion.linVel.Y to motion.linVel.Y+250
rule. if game.jump = 2, change attribute motion.linVel.Y to motion.linVel.Y+250
actor: wall
if collides with player, change attribute game.jump to game.jump=0
-----------------------
2. When my player collides with the wall (platform), every single time I jump and it collides, the wall moves down. So, if I jump alot, the wall will end up disappearing off the screen, with my player (which doesnt moves left/right, only jumps)
I tried constraining attributes, and also adding like, if collapses with player, move wall alittle up with the position.y, guess the logic of my "code" was bad.
any ideas?
thank you veeery much!
--edit:
downloaded a template and could fixed both.. sorry for the post
after looking around and trying all I could, i don't think I'm getting somewhere
I have two issues:
1. I made the double jumps, and they do work fine (I think):
- if I double tap quick, it jumps abit high, but thats fine!
This is the problem:
if I tap (1jump) and then when the actor is falling (almost touching the platform) and I tap again for the second jump, it barely jumps (maybe 1 pixel up?)
[this is what i have]
----------------------
game.Jump =0
actor: jump button
if gamejump <= 2, then change attribute game.jump to game.jump+1
actor: player
gravity 270 down, acc 400
rule. if collides with wall,change attribute game.jump to 0
rule. if game.jump = 1, change attribute motion.linVel.Y to motion.linVel.Y+250
rule. if game.jump = 2, change attribute motion.linVel.Y to motion.linVel.Y+250
actor: wall
if collides with player, change attribute game.jump to game.jump=0
-----------------------
2. When my player collides with the wall (platform), every single time I jump and it collides, the wall moves down. So, if I jump alot, the wall will end up disappearing off the screen, with my player (which doesnt moves left/right, only jumps)
I tried constraining attributes, and also adding like, if collapses with player, move wall alittle up with the position.y, guess the logic of my "code" was bad.
any ideas?
thank you veeery much!
--edit:
downloaded a template and could fixed both.. sorry for the post
Comments