bonjour a tous, je vous explique mon problème, j’aimerais mettre en fonctionnement un système de sprint comme dans call of Duty/GtaV/fortnite, quand on appuie sur Z + Shift et que je le relache Shift je cours pas de problème sur ca mais quand mon perso s’arrête complètement j’aimerais qu’il marche seulement comme la plus part des jeux actuellement et non pas qu’il recours directement, je débute sur unreal engine, merci a vous et au plaisir de recevoir de l’aide !
If I’m not mistaken it should be like this.
I don’t know what that event does.
But if this event is with “shift” then you can do what I said. Otherwise you will have to adapt it.
Normally “running fast or sprinting” is always done with the press and release. That’s 90% of the time.
In case you want to do a flip flop, that approach does not work for you.
j’avais ce blueprint de base mais le soucis c’est on doit constamment appuyez sur SHIFT, alors que j’aimerais un système comme ca: SHIFT + Z pour commencer a courir → Appuyez sur Z pour continuer de courir → s’arrêter en appuyant sur aucune touche → Appuyez sur Z pour marcher
Whenever you use “Z” + Shift, it won’t work for you.
The problem with using “Z” + Shift is that “Z” doesn’t tell anyone anything about the direction the character is going. While “W” always goes forward (it is the default)
You have two options.
1 - Modify “Z” to do that (like a forward W)
You can add “Z” as an alternative key to “W”.
So you will have W and Z. But you are changing the behavior of Z. In the long run, I don’t know how productive it can be.
2 - You should change “Z” + Shift, to simply “Shift”, maintaining the flip flop.
That is, your input event would only have to be a type of “shift, shift, ctrl…” control keys.
Then it would look like this:
Event Input (shift) → press flip flop A → Set 700
Event Input (shift) → press flip flop B → Set 240
Just the way you have it, only with a control word and “W” takes care of the rest.
So if you press “Shift” once, the sprint will be permanent with the flip flop, and if you press “Shift” again, you will no longer sprint.
Remember, when the user is not running, you have to configure it to stop running fast.
As you have with flip flop, you will have to adapt the logic you want to do when the player stops sprinting.
Reset a flip flop? - Development / Programming & Scripting - Epic Developer Community Forums (unrealengine.com)
J’essaye ca et je reviens vers vous ! (encore merci de prendre du temps pour ce problème !)
je vous remercie pour ma part ca marche plutôt bien, je penses qu’il y a de meilleurs blueprint que celui que j’ai crée mais avec le multigate ca a l’air de marché ! un grand merci a vous !
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.