Check out my Runner Game Series Playlist teaching you how to make a base game and then turn it into all kinds of different games using Unity + Playmaker ruclips.net/p/PLhvjMi_0yrQzTgK-vhXDdi8OHBoCsx5D_
@@BlizStudio Totally understood! Not trying to give you a hard time, just thought I'd point it out in case someone else went "?" haha. Thanks for the hard work!
Yep, you need to make sure you do the step setting up that you can't jump again until the player has touched the ground first. Couple ways you can do that. You can do a raycast which is like a laser line and if that line touches the ground then you can jump again or you can do a collision detection of the ground. Let me know if you need more help. Also you can pop over to my discord (link up in the top pinned comment) and I can help there better.
Thanks for the tutorial. I have a problem, my player seems to make a small jump before the actual jump and then going back to the original state. How do I fix this?
@@BlizStudio Thanks, I realised what the problem was, my character script was interfering with the jump FSM. When I disabled it as a child of the jump object, it worked. Is there any way to separate it so it works when enabled?
Yep, in my example, I have the player movement as one FSM, and then Jump as a second FSM, and I have climb as another FSM all separate FSMs controlling the player.
@@BlizStudio Thanks, this worked! Also, I tried to play an animation with the 'Play Animation' action but it doesn't work. I am using a C# script for movement and animations. How do I fix this?
Hey Quran, do you have a rigid body component on your character? Also, in the playmaker Add Force 2D action, do you have "Impulse" as the force type selected?
Hey! I followed your previous tutorial on player movement and flipping which worked great, but when I tried this tutorial to get my character to jump he just stands there and it doesn't work. I turned off the player movement and the jump seemed to work fine so I believe the issue is in the player movement and won't allow the jump to work but I can't figure out what it is! Lol
Hey Emilie, make sure in your player Move FSM that you have in your Set Velocity 2D to NOT set the Vector line. That should have "none". Only set the X value. If you have the Vector set which is both X and Y the Y will be competing with your jump.
Hey Jerry, when I initially jump, the raycast appears to be checking the ground straight away, and so I can still double jump. Should I put a delay or something after I jump?
Hey Jon O, one make sure you aren't checking your terrain until after you make the jump. So a state to listen for key press. The next state would make the character jump (add force 2D), then it would go to a state that is checking if the player hits the ground with the Raycast. A couple things to check on your Raycast. One, is make sure you have the Raycast just as long as you need it to be to reach the bottom of your character. Another way to also accomplish the same thing will be with using a Collider 2D event. You'll want to add anything the player can jump on to that specific layer, has a collider, etc... Then if the player Collides with one of the game objects on that layer then it will allow another jump. (I think Raycast works better though.)
Hey @immersiveBlue make sure that in your move FSM that you DON'T have the to XY in your translate set as well as the individual X. That XY is by default set to 0. This is what usually prevents a jump. So just uncheck the variable option there so that it says None. But you will have just the individual X set down below in the action.
Hi Jerry, it's probably pretty simple but how would you add a land animation that transitions back into the idle state? Can't find much on RUclips for this, at least not with Playmaker. Thanks for making such accessible tutorials!
Hey Jesse, Just add another playmaker state right after the grounded state that plays the landing animation (which would probably be a short animation). In that state, play the animation and also a short wait. That should work well. You probably don't want the player to move during that landing animation either (if it's like a super hero kind of dramatic landing) so you would want to disable player movement during that time then re-enable once the animation is done.
@@BlizStudio great! thanks for the fast reply! And if the player movement is in another FSM or another script, what's the best way to disable it from within the jump FSM landing state?
You can do it a couple ways. Easiest would be to just deactivate the Movement FSM and then re-enable it. Or you could have a empty state in the movement state that has nothing in it and that state have a Global Transition on it. You can then use the Send Event by Name to place movement in that state, and then when done use another Global Transition to go back to your idle movement.
I have an interesting question. I can move, and I can Jump... but I can't jump while moving. I can see all the States turn green in order on my jump, but he wont leave the ground if moving. Do you have any Ideas what I could be doing wrong?
Hey Brandon, do you have your jump actions inside of the Move FSM? If so it can only be in one state at a time. Jump, I make as a separate FSM and you'll still be able to move and jump at the same time.
I've got it working! However, if the character falls from any height it doesnt get passed the ground check again. And then sometimes it will do the ground check properly but then it'll let my character double jump. Any idea what could cause that?
Part of it could be speed and the collision itself. In the Player's rigid body component, make sure the Collision type is set to Continuous or Continuous Dynamic. It's discrete by default. Again speed is a factor, how often you are checking recast if you are doing recast, and timing.
@@BlizStudio hey thanks for the reply! With the video being almost a year old i wasnt too optimistic 😅. I checked it out and the players rigid body is set to continuous and my raycast has the same settings as you. Could it possible have to do with the players box collider?
Hey Jo'siri, in your Add Force action, are you applying a force type of "Impulse"? This pushes that force all in one kind of explosive force vs a little at a time.
@@BlizStudio yeah I made a new file and increased everything by 10, and it works know. Also using playmaker how would I make something that can only move when you look away?
Oh dang. That's an interesting question. Maybe let me know a scenario to better understand. So like a ninja enemy only moves when the player isn't looking? If something like that, then you can have a collider on the player that is set up in front of the player as a field of view that is a Trigger . Then on the ninja character, it detects if the on trigger stay (vs trigger enter) then the ninja freezes. If it does trigger exit, then it can move again.
Check out my Runner Game Series Playlist teaching you how to make a base game and then turn it into all kinds of different games using Unity + Playmaker ruclips.net/p/PLhvjMi_0yrQzTgK-vhXDdi8OHBoCsx5D_
Finally! someone made tutorial on 2d Jump in playmaker THANK YOU SO MUCH 💖 You are the best playmaker RUclipsr 🙂
Thanks NotaK. Definitely lots more coming here.
At 4:06 you skip over connecting the transitions connecting ground check to Jump. Just an FYI.
thanks @wRayth. That might have been me being a little aggressive in the editing process. 😳😬 ( I wish I had a vid editor 😊).
@@BlizStudio Totally understood! Not trying to give you a hard time, just thought I'd point it out in case someone else went "?" haha. Thanks for the hard work!
lol. no worries. This is great info and a good catch for sure and much appreciated.
Check join my discord, post a comment here and I'll reply with the current invite link.
Super excited to try this out tomorrow! Thanks for this 🙌
I need to get back and add some more to this tutorial series. The drive that had that project on it failed so have to recreate =(
Hello, why is mine a double jump, can you help me🙏
Yep, you need to make sure you do the step setting up that you can't jump again until the player has touched the ground first. Couple ways you can do that. You can do a raycast which is like a laser line and if that line touches the ground then you can jump again or you can do a collision detection of the ground. Let me know if you need more help. Also you can pop over to my discord (link up in the top pinned comment) and I can help there better.
I solved this by changing the order of the states: Jump Input > Ground Check > Jump > Jump Input...
Thanks for the tutorial. I have a problem, my player seems to make a small jump before the actual jump and then going back to the original state. How do I fix this?
Hey H.K, you need to make sure in the Add Force 2D action, you set the type of force to "Impulse". This will make your character jump.
@@BlizStudio Thanks, I realised what the problem was, my character script was interfering with the jump FSM. When I disabled it as a child of the jump object, it worked. Is there any way to separate it so it works when enabled?
Yep, in my example, I have the player movement as one FSM, and then Jump as a second FSM, and I have climb as another FSM all separate FSMs controlling the player.
@@BlizStudio Thanks, this worked! Also, I tried to play an animation with the 'Play Animation' action but it doesn't work. I am using a C# script for movement and animations. How do I fix this?
hey !! i have done every thing the way u did but the character is not getting the jump force applied. the rest is fine. what do i do???
Hey Quran, do you have a rigid body component on your character? Also, in the playmaker Add Force 2D action, do you have "Impulse" as the force type selected?
yes
@@BlizStudio is there a way to send u the screen shots of my fsm , rigid body and colliders of my player?
@@cyberwolf1198 Best would to join my discord and you post screen shots there. discord.gg/5zvqccN3
@@BlizStudio I also had this issue
Hey! I followed your previous tutorial on player movement and flipping which worked great, but when I tried this tutorial to get my character to jump he just stands there and it doesn't work. I turned off the player movement and the jump seemed to work fine so I believe the issue is in the player movement and won't allow the jump to work but I can't figure out what it is! Lol
Hey Emilie, make sure in your player Move FSM that you have in your Set Velocity 2D to NOT set the Vector line. That should have "none". Only set the X value. If you have the Vector set which is both X and Y the Y will be competing with your jump.
Hey Jerry, when I initially jump, the raycast appears to be checking the ground straight away, and so I can still double jump. Should I put a delay or something after I jump?
Hey Jon O, one make sure you aren't checking your terrain until after you make the jump. So a state to listen for key press. The next state would make the character jump (add force 2D), then it would go to a state that is checking if the player hits the ground with the Raycast. A couple things to check on your Raycast. One, is make sure you have the Raycast just as long as you need it to be to reach the bottom of your character.
Another way to also accomplish the same thing will be with using a Collider 2D event. You'll want to add anything the player can jump on to that specific layer, has a collider, etc... Then if the player Collides with one of the game objects on that layer then it will allow another jump. (I think Raycast works better though.)
Im only in jump input and it wont jump
Hey @immersiveBlue make sure that in your move FSM that you DON'T have the to XY in your translate set as well as the individual X. That XY is by default set to 0. This is what usually prevents a jump. So just uncheck the variable option there so that it says None. But you will have just the individual X set down below in the action.
Can you create course beginners to advanced playmaker
Hey Kiran, what kind of games? I've started an outline of a full course. Not sure where I will host it yet.
after you told me to make the vector to none , my player was jumping. But now my player is jumping twice instead of 1 time
what should i do?
Just make sure you have your Ground Check in your loop and that the Raycast in the Ground Check state isn't too tall.
@@BlizStudio still not working
Hi Jerry, it's probably pretty simple but how would you add a land animation that transitions back into the idle state? Can't find much on RUclips for this, at least not with Playmaker. Thanks for making such accessible tutorials!
Hey Jesse, Just add another playmaker state right after the grounded state that plays the landing animation (which would probably be a short animation). In that state, play the animation and also a short wait. That should work well. You probably don't want the player to move during that landing animation either (if it's like a super hero kind of dramatic landing) so you would want to disable player movement during that time then re-enable once the animation is done.
@@BlizStudio great! thanks for the fast reply! And if the player movement is in another FSM or another script, what's the best way to disable it from within the jump FSM landing state?
You can do it a couple ways. Easiest would be to just deactivate the Movement FSM and then re-enable it. Or you could have a empty state in the movement state that has nothing in it and that state have a Global Transition on it. You can then use the Send Event by Name to place movement in that state, and then when done use another Global Transition to go back to your idle movement.
also... good questions!!
very helpful, thanks!
Thanks kizz06!!
I have an interesting question.
I can move, and I can Jump... but I can't jump while moving. I can see all the States turn green in order on my jump, but he wont leave the ground if moving.
Do you have any Ideas what I could be doing wrong?
Hey Brandon, do you have your jump actions inside of the Move FSM? If so it can only be in one state at a time. Jump, I make as a separate FSM and you'll still be able to move and jump at the same time.
I've got it working! However, if the character falls from any height it doesnt get passed the ground check again. And then sometimes it will do the ground check properly but then it'll let my character double jump. Any idea what could cause that?
Part of it could be speed and the collision itself. In the Player's rigid body component, make sure the Collision type is set to Continuous or Continuous Dynamic. It's discrete by default. Again speed is a factor, how often you are checking recast if you are doing recast, and timing.
@@BlizStudio hey thanks for the reply! With the video being almost a year old i wasnt too optimistic 😅. I checked it out and the players rigid body is set to continuous and my raycast has the same settings as you. Could it possible have to do with the players box collider?
My jump works if I don't have a transition, but If I add one it'll go through (I can see it activating), but nothing happens
Hey Jo'siri, in your Add Force action, are you applying a force type of "Impulse"? This pushes that force all in one kind of explosive force vs a little at a time.
yeah
And you have a rigid body to your player?
@@BlizStudio yeah I made a new file and increased everything by 10, and it works know.
Also using playmaker how would I make something that can only move when you look away?
Oh dang. That's an interesting question. Maybe let me know a scenario to better understand. So like a ninja enemy only moves when the player isn't looking? If something like that, then you can have a collider on the player that is set up in front of the player as a field of view that is a Trigger . Then on the ninja character, it detects if the on trigger stay (vs trigger enter) then the ninja freezes. If it does trigger exit, then it can move again.
Why my character wont jump
Hey Hudiya, pop over to my discord discord.gg/DgUdNDT7KU and you can explain what might be going wrong and how we can help fix.
can u send me a discord invite?
discord.gg/8eBGqx3b
discord.gg/DgUdNDT7KU