!!!!!Need some help with some character moviment related actions???!!!!

hello again :D:D:D:rolleyes:

i’m here again because i need some help with 2 issues toward "character moviment.

1 - double click to run - how i can make a character “run” when pressing 2 times the moviment buttom???, like some games were you press 2 times the analogic buttom the character start to run.

2 - Dash attack
here my "basic attack ('im still building it)

now my issue is on that running check, i want to make a check were if the character is moving at max walk speed then he will do a "dash attack( the one at the top) if him is just standing still or walking then he will do the normal attack, again like some 'games were you have a "dash attack, were when you are running if you press the attack buttom he will do a speciall running attack like a charge attack, how i can do proper check on it???, what would the be "missing checks? all my attempts aways ending as when i’m pressing the “run” he will attack even if the character is not moving, like currently i’m using the “old press and hold a extra buttom to run”, then i want a proper check to see if the character is actually moving to be able to do the “dash attack animation”.

in case i get the answer for the double click then it cold also help fix my second issue???, in case i get “both” fix how i could proper make the character "attack after double click the moviment buttom then pressing the attack buttom???

anyway thanks for any and all help.

Here’s something about double key presses:

well in theory it worked in part, because it work if i use a "normal input buttom like the basic one for walk/run like that:
but not how i’ve made, which was this one:

how i can add that function here using this axis input??? i’ve tried some stuffs but could not make it work any help is welcome

It’s the same sort of thing. When the axis is set to 0, start a timer. When the axis becomes 1 again, look at the timer, if it’s only been .5 seconds, you can assume it’s a double press.

I’m afraid I can’t show any nodes, as I not at a machine right now…

Hi Ellessarr
I just learned how to do this, just this week. The part you’re looking for is the Do N, and the Switch in Int if I’m reading your post correctly.
The On Landed is used to reset the whole thing.

Hope this helps. it works great, and if you want a triple, then use Add pin to make another one. Nothing gets plugged into pin 0


ok i gonna try to check it, thanks for the help and would be good if when you have time you could show the nods to see if i’m doing right.

again ty for the help.

ok i’ve made some tests and for now i was able to make the character run with double clock but the problem is making him "go back to walk when release, here the nodes:

the problem now is which when i’m linking the “released” to the delay and set pressers to 0, it make the character “never run” or he start to run but after the “delay” play it set the pressers to 0 and make the character stop to run and walk in the middle of the run, i means it ignoring the “released” condition and go back to walk in the middle of the pressed event, if i remove the "released condition it “will run” after i click 2 times but will remain running forever.

any help?

Very good :slight_smile:

The problem is, when you first release, that delay starts and there’s no stopping it.

Change the delay for a retriggerable delay ( it’s in the list ). Re-triggerable delay gets reset every time you call it :slight_smile:

EDIT: No that’s not going to fix it actually, thinking…

EDIT2: Check out:

What you need to do on ‘released’: retriggerable delay of about .5 seconds, then check ‘is key down’. If the key is down we know the player is still on the ‘pressed’ branch, so we don’t need to do anything. If the key is not down, then clear the ‘press counter’ and rest the walk speed.

wow thanks it’s worked, the only issu was the delay, 0.5 is too much, sometimes it can make you move running instead of walk if you "click again too fast then i had to use the 0.1 it value to make it more precise to go back walking if you press again the buttom.

here’s the result:

since the game is a side scroller, hack& slash, i don’t want it to “run up” or down" just left an right", now the new problem for me is find a way to “prevent the character to “jump” up and down, i means he can only jump and move to left and right, if i’m pressing to up or down he will just jump in place, then i would love to see a check for the “direction” if is up or down” he will jump in place, if his left or right then he will move

and my last issue is about the "character look direction, i need the character to aways be looking or right or left, if i press to “move up or down he not will turn to up or down”, he will move up while looking to right or left based on the current side he is looking( if him is looking to the right then he will go up or down while still looking to right, he him is looking to left the he will move up or down while still looking to “left”, i want to emulate old "hack & slash old games like golden axe and dungeons & dragons, where all the actions are done left to side and you only go up or down to move never to attack or jump or crouch or any other action.


Well, stopping jumping up and down is the same kind of thing. Whatever key you have to jump, only let it work if the are also holding the key for left or right. You can check that with your new is key down node… :slight_smile:

well here’s my first attempt, it don’t go well, the character still moving in the “air” and only stop of moving after land and it make him full get a delay before i can move him again (when trying to walk he was frozen for few seconds then go back walk).

i need it to make the character when moving up, if i click on jump he will “jump in the same place” as the same as if i was just pressing jump without move.

Hi - you got the graph wrong. You have a link to the jump node on False from second:

hmm ok thanks, my bad, here the update:

ok "somehow worked, but not exactly as i wanted, now when i’m pressing w or s the character just can’t jump, which is not exactly what i really wanted, i wanted he still being able to jump he just “jump inplace” without move up or down.

Another issue is which "still possible to move a little up and down, if you “jump” and move, your character still move a little up and down even with the speed being set to 0(idle), is probably a effect from “gravity and others conditions”, not sure, but the issue is really him being unable to jump while moving up or down, he was supposed to jump in place, i’m still need to find a way to use the input down key to “disable” the moviment from the uo axis without totally disable the jump, he gonna just jump in place.

but it already was a starting,

really thanks you are helping a lot.

Sorry, I have to bail at that point, it’s getting to complicated to debug without a machine.

You have all the ingredients you need ( delay, key presses, is key down etc ), it’s just a matter of how you combine them.

You might need to simplify the branch chain you have there, it never needs to be more than 2 :wink:

EDIT: What you can do, instead of having lots of booleans, is to have one ‘state’ variable, which is just a string. It can take values like ‘walking’, ‘running’, ‘standing’, ‘jumping’ etc.

Then you can separate all the parts of your graph neatly. You have one part for jumping, one for running, one for …

And in each part, you start with a switch node on the current state. For instance, jumping is only possible when you are currently standing.

That kind of thing. Just an idea… :slight_smile:

hmm ok thanks for all, about the branchs well i’m still not enough experienced with unreal, this is my first real project then i’m still a little “green” toward all those stuffs and nodes and i don’t know how to do that “now”, how to make that state variable" for now, if you could provide a more detailed way to do that i would be happy, otherwise i will try to check for it, because indeed the nodes are start to get “too big” lol, because it’s really too many variables.

anyway thanks.

Like I say, the ‘state’ variable is just a string. So you can make it anything you want ‘walk’ ‘run’, ‘jump’ etc…

At the beginning of each custom event for movement, put a switch node on the string:

For instance, on the event you have for running, if the current state is ‘jumping’, then you just don’t allow the player to use the running node.It’s not even a pin.

So you can always control which state the player is in, only change states when it fits.

hmm interesting i will give a try to that, thanks again.

Now i’m trying to work in the “combo” part of the combat, i’ve already made all the “combos” and the character now when i press the attack buttom is doing different attacks from the “combo”, now the issue is how i can setup it to only do “combo” if its hit anything, if the player is just pressing the buttom without hitting anything he just keep doing the “first” regular attack and only if him hit a colision capsule then he go to the second and if hit then go third and others, now this is being my head cache, i need 2 checks one for if he is hitting something if the next swing don’t hit anything reset the attack count going back to the first attack and if the player take “too much time between” clicking the buttom it will reset the counter too, like the character press the buttom one time then take like 2s to press again then instead of go combo he go back to the regular swing, i’m stuck on that here the "combo node:

currently the character is doing the “combo” whenever the player click the buttom and aways do the full combo, like i click the buttom one time he does attack 1, then if i move or jump or do other thing then later press again he goes attack 2, then if i press again 3 and finally 4 after the last press, it only go back to the first press after it was pressed 4 times and i don’t want that.

i need to find how to insert those “checks” on this node.

Put all that attack gubbins in a function. Make a function that returns the attack animation.

Every time you call the function it uses the node GetGameTimeInSeconds to figure out how long it was since the last time it was called.

You can store the game time in a variable. So you know when the player last called the function.

So, the function just returns the default animation ( from array 0 ), if it’s been too long since the last call. But if the function is getting called quickly enough, it starts returning animation 1, 2 etc and incrementing the counter ( just like you have already ).

That’s how I would do it…