When the initial jump key is pressed and the player goes up, it stops playing the jump animation, then stops as long as you have your finger on the jump button. It does not play the falling and landing animations either. Now I tried setting up a method in which this could happen, but I eventually gave up. My game requires the fall animation to remain playing for any given length of time until the player lands on the ground. No matter what happens, even if the falling animation doesn’t play in time, the landing animation has to play one the player lands on the ground.
My method was to play the “falling” animation once you let go of the “x” key. I did this by adding a keyboard sensor, making the key “x” and then inverting it. Once this happened, it would then “change state” to state 2, where there’s an Always sensor playing the “falling” animation. This did not work, so needless to say, I have no idea on how to pull this off for the “landing” animation.
Another issue I run into with this is that the jump animation can be played continuously while in the air, even though the motion is only set to play two jumps before falling. There’s also an issue of the “jogging” animations playing while still in the air. I’m so freaking lost with these animation priorities, I have no idea how to organize those.
If there’s a way to do everything I just talked about with just logic bricks, or if there is a python method to going about this, I could be greatly appreciative, I’ve almost completely ran out of hope. I’m having the same exact problems with punch combos.
I’m using 2.78c, but that doesn’t really answer the questions. Even if I was using the correct version, I still don’t know how to solve this problem. Could you please look at the file to see what I did wrong? I’m also not sure what animation bugs you’re talking about.
So which gets connected to which? What I thought was that I’d have to put a game property on the armature and make it an integer, then put a ray sensor on it. But since I don’t understand how ray sensors work, I’m kinda just going off on a whim. Could you properly explain the step by process, as in, WHICH actuators get connected to WHICH sensors and their settings? I’m ignorant as a baby, you can’t explain something like this to me and expect me to just get it right away, this stuff is complicated to me. I’ve only gotten this far from in depth tutorials.
In this video, I show what my problems are. Keep in mind that I’m pretty new to all this, so I don’t quite understand everything. Also, if you need to download it, you’ll have to watch it in the VLC player, it doesn’t wanna work in Windows.
Your logic design in your demo file is focused on keyboard input. Your request does not deal (or not just) deal with keyboard events.
Lets stick this together:
jumping -> jump key gets press till released (or maybe till the jumping animation ends?)
falling -> as long as the character is in air
landing -> touching the ground
You can see these as three different states. Isolates the complex process to smaller isolated tasks. Lets add the state outside of falling -> standing which is the initial state.
From standing to jumping is done by jump key as you already do it. [keyboard sensor]
I suggest to play the jump animation till the end rather rely on the user input. You might want to implement something like “channeling” to perform dynamic jump strength. Event then after the jump force was applied … jumping is done and continues with falling. You can measure the end of the animation via [Actuator sensor]
Falling means the character is already in the air. If you want you can let the character perform any artistic motions - it is still falling. (Unless you want to implement a game element “jump in air” as some games do - which requires another state). Falling ends with touching the ground (or nearly touching the ground) [collision sensor]. This event transits to landing state. Any falling animation should end now.
Landing is typically just playing he landing animation. So it ends when the animation ends. Typically the character will stand around after that.