x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Setting max walk speed in blueprint

I have set up simple sprint logic that increases the character movement's max walk speed when shift is pressed and sets it back to a base value when shift is released. I also print the "max walk speed" on these events. When I test the game, the desired values are printed but my character continues to walk at the same pace. Are there any other steps I need to talk to modify this value? alt text

Product Version: Not Selected
Tags:
sprint.jpg (78.8 kB)
more ▼

asked May 26 '14 at 11:19 PM in Blueprint Scripting

avatar image

RRadix
26 1 1 3

avatar image Divo May 27 '14 at 11:51 AM

Are you getting feedback via your print strings?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Hi Wes, Thank you for your response. The method you posted is another way to increase the "max walk speed". Increasing the max walk speed during play does not increase the rate at which the character walks, unless I am doing something wrong. The solution I came up with involves modifying the move portion of the blueprint (which was provided in the first person template). This feels like a super round about way to do this, and I would love to hear the way it actually should be done.

This is the code from the template that makes forward movement happen, notice I have redirected the move forward event chain to another area, depicted in picture 2. It also sets a scale value (Speed Factor) to "Add Movement Input":

alt text

This is the chain I added, It caps the max speed of movement, as changing the scale to a value other than one causes acceleration. It caps the speed to a maximum of (My Max Speed). On the right is my sprint chain. It sets the (speed factor) to either .01 for walking speed or .1 for running. alt text

solution1.jpg (97.3 kB)
solution3.jpg (146.5 kB)
more ▼

answered May 29 '14 at 02:31 AM

avatar image

RRadix
26 1 1 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

What is your Max Walk Speed float actually plugged in to? Your scale value on the Add Movement Input?

I am honestly not sure what is happening with your Set node there, but end result the Float needs to get fed into whatever is driving the movement. Everything else looks like it should work.

more ▼

answered May 27 '14 at 09:59 AM

avatar image

Zeustiak
1.8k 131 68 110

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hello,

Jumping in with another way to possibly do this:

alt text

Have an Event Tick call a custom event called whatever (in this case Sprint). Left Shift is hooked up to a Gate Node which allows for the Max Walk Speed to be set to my Run Speed Variable (which is 600) whenever Left Shift is held. When I release, it sets it back to my Walk Speed Variable (which is 175).

Just to give you another way of approaching it.

-W

sprinting.png (94.8 kB)
more ▼

answered May 27 '14 at 06:36 PM

avatar image

DizzyWes ♦♦ STAFF
5k 145 64 206

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question