Announcement

Collapse
No announcement yet.

Simple run/sprint with shift key + animations

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Simple run/sprint with shift key + animations

    Hi,
    I've trying to solve this problem since a few hours, but I can not.
    I want to create a sprint with the left Shift button. If it pressed, an animation plays and the speed goes up. If it held, an another animation plays as long as it is pressed. If it released the speed and the first animation plays fast to slow. I tried a lot, and searched here also, but I can't find a version I understand, so sorry if I asked this for the 100th time.
    Version: 4.8.3 and the Third Person template.
    The last what I tried (do not laugh )
    Click image for larger version

Name:	Untitled.png
Views:	1
Size:	494.7 KB
ID:	1160248

    #2
    In the end I just created a speed change when I press or release the left shift key, but this is not too good. I am still looking for somebody's help, how to add animations. There are a lot games (I think almost every 3d game) that use this kind of animation setting. For example Assassin's Creed 3-4. You press something to walk, and you run simply when you not press anything. You run faster when you press something. And there is a great thing in that what I want to get. When I start the animation (I hold the shift to run faster) and imidiatelly release it, the animation won't stop, it goes back to the normal run. I want to achieve this if it is possible for a beginner like me. (I know that the udk is able for this) Please if you can give me some hints or tutorial, I would be happy

    Comment


      #3
      You need to use animation blueprints to implement proper animation mechanism. There are plenty of tutorials out there. directly playing animation is infeasible to scc achieve what you want . Only way is using animation blueprint with a proper anim graph

      Comment


        #4
        Ok, thanks

        Comment


          #5
          Another way you may do it is to decrease your speed gradually when you release the run modifier key (usually shift). Take your current speed, drop it a few notches, wait 0.2 seconds or so, repeat until you are back at your normal speed. Make it a function, put it in a Timer and you'll be all set with a gradual sprint to run or run to walk or sprint to walk or whatever.

          The speed control is easy, as for the animations you will have to set that up yourself like Commander Shepard said.

          Comment


            #6
            I watched some tutorial videos about this, and blueprint, so I made a sprint function to the game. Thanks for the help

            Comment

            Working...
            X