jumping problem while moving forward

first of all, i’m using velocity. ok, so my problem is that whenever i hold the “forward” key, and press the “jump” key, nothing happens until i let go of the forward key,once i do then i jump. i can jump while just standing still, or while turning, but not while moving in any direction.

Example blend file : http://www.freewebs.com/demobobin/adventuregametest.zip

Hi !


I have dowloaded your blend : I don’t understand why you have made a walk script and a jump script ? You just need a script for the mouse direction ! And without walk and jump scripts, you can easily jump while you’re moving !

thanks. but i kind of want to have the walk and jump functions done by script for reasons later on in the game. if there was a way to do it still using the scripts it would save me alot of work later on. but if there isn.t another way then i’ll do without it. thanks again for the suggestion

Sorry demobobbin, but Python is too hard for me…
We can make a lot of things without it, and I am not a coder, so I don’t use it…

hmmm…, i decided to make the actor jump and move without python, but i ran into another problem, i could jump and make my actor move forward when it was in the air, so i made the “and” controllers connecting my sensors for my forward (“w” key) and my jump(right mouse button) sensors into “expression” controllers, with the expression being “groundhit=1”(a ray sensor set property “groundhit” to “1” when positive), now i can’t jump while i’m still in the air(good), but i can’t stop moving when i press the w button on the ground(bad)

ideas anyone? :expressionless:

Can you put your blend file online ?

ok, i put the two other examples in with the old file. the one labeled “test8” is the one you already saw(the one using the scripts), “test9” is the one that you can jump while moving(but also the one that you can jump while in the air),and “test10” is the one where you don’t sop moving.

oh, sorry forgot to mention that you just click on the link you did before

Ok, with your test9 file :

  1. You can add an “Actuator Location constraint” to your sphere (check the X,Y,Z axis)

  2. If it doesn’t work, you can create a big plane, the same as your ground, (at the max height you want). This plane will be textured invisible BUT won’t be “actor ghost” : your sphere will collide to it…

  3. Maybe the safest solution is Python?

My two cents: You can’t make even the simplest game without a minimum of coding.

And python is the most beautiful language, even more for beginners.

So start learning programming, and python.

Otherwise you’ll end up with tons of sensors (slooooooowwww), tons of properties (unmanageable projects), and a totally dumb AI (even an ant behaviour can’t be defined just with logic bricks).

Please, listen to me. Do yourself a favour.

If you’re into blender game engine, you’re already a nerd. Don’t be scared to become more.

What archiver are you using? I can’t unzip your file with Linux unzip, so I don’t really know what you are talking about.

I have been working on a walking-running-character and I ran into similar problems. There has been some difficulty to it, because different animations must be blended at the exact frame depending on whether the character is still or walking before jumping. Then there is a delay before the actual jump in order to play a prepare-to-jump animation, and then another animation when landing and before resuming the walking. I too use velocity and Python. I am currently using three timers and an inverted touch detector. It works great except for some collisions which still cause me some interference with keyboard sensors when walking on a sloped surface.

http://img78.exs.cx/img78/9874/shot71.jpg

Ciaocio said

My two cents: You can’t make even the simplest game without a minimum of coding.
So start learning programming, and python.
Otherwise you’ll end up with tons of sensors (slooooooowwww), tons of properties (unmanageable projects), and a totally dumb AI (even an ant behaviour can’t be defined just with logic bricks).

I agree !

If you’re into blender game engine, you’re already a nerd. Don’t be scared to become more.

Yes, very funny ! :smiley: :smiley: :smiley: :smiley:

MMh if you want a delay in the jump, like: prepare to jump animations > then jump> come down. You can delay the jump velocity using a timer. Like when you press ctrl, the timer count to 2 (between hitting the button and 2 secs the anim is played) afther that 2 seconds the motion is triggered and the character jumps. :slight_smile:

first of all, i know python. thats what i was using to begin with and couldn’t get to work. thats why i came here, to try to find a different solution to my problem. i thought about writing another script, but i don’t really see a different way to write one. in my “test9” i have the scripts in use, so you can look at them. maby i should have just asked for help fixing the script, but i think the problem goes deeper than that. so please any way you can help any new ideas, or just a different perspective, just post them and i’ll try to use them

It’s looking like an issue with combining linV. Maybe it’s a big that has to do with using local/non-local linv’s? If you change the jump to force it works as expected (but of course force is bad because it’s framerate dependant for jumping). But you could use force for movement and linV for the jump.

It’s because LinV sets the velocity of the object, so actuators using LinV overwrite each other. I think saluk’s suggestion of using force for the forward movement and LinV for the jump would work best.