Speed Change

Hello so I’m currently trying to learn how to make a game and right now I’m trying to change speed using an event box however I can only get walk speed to change but not sprint speed

Sprint is ‘max walk speed’ :slight_smile:

ok the wording for the question needs to be better that’s on me. but what im trying to do is set an event trigger box to change my standard walk/sprint (600/1200) to walk/jog (150/300) like im walking into a village

You need to define a State (enum) and use that state to determine the correct speed and set it (CMC → Max Walk Speed).

Also, how you approach the coding depends on is this for multiplayer or single player.

Use the Search provided by the forums (top right). Search for Sprint.

I’ve posted quite a few times on this recently with code references.

completely new so don’t know anything about enum’s but ill try to dig for them. Ya I have heard people bringing up single player or multiplayer (in my case it’s single player) but ya I’m starting to use the search feature here cuz i have been typing thing in google and hoping for an answer XD

hey so im not sure on the method RevOverDrive has said but seting up a function for your event trigger is some what easy can just move everything from the branch to a function and all you do is on the sprint trigger it uses the function,https://i.imgur.com/JiY00L2.png
You also need to in your level have a trigger box that will set InTown variable to true while inside im not to sure as im new aswell some1 with more lvl design nohow can fill you in on that

otherwise thats a really simple basic means of doing it hope that helps

So do have a trigger box actor on the level set and I’m playing with it’s blueprint but i don’t think i follow on what you mean by the sprint trigger image. This is what i have set so far though


sooo been playing around my Game was from befor they added the enhanced input action stuff so i have to figure out how to get that to work here some updated images

[Step 1.0] Add a Trigger box over town (ill let you figure that how)
[Step 1.1] Select trigger box in world and open the level Blueprint (2 - 3 in the image)

[Step 1.2 - 3] see blueprints image’s

also if havnt set up the IA_Sprint trigger you need to ADD 2 triggers “PRESSED” & “RELEASED” like in the image below

Hopefully this helps this time XD

You can but do not need to. Use the IA’s Started if you want a single execution per input.


@Jumper200091

No need for addition input nodes; since we’re already moving, the whole thing could be boiled down to:

Ensure those 2 variables have some default values and have something else Set them as needed:

I’ll throw that down later today but i can’t believe how close i have been this entire time

So I’ve been trying to connect the “As BP Third Person Character” to “Set Target” but it does not connect am I missing something (The trigger box itself has the BP not using a level BP)

It’s not set target. We’re setting values of float variables, and the 3rd person BP is the target BP where those vars can be found.

If in doubt, post a screenshot of the bit that does not connect.

ah ok still picking up on the other stuff like using the float variables node. I’ll give a shot hear soon



So far that’s what I attempted but to no avail for me. Also don’t know if this makes a difference but the overlap is in a separate BP for the trigger box

You never use these variables in the character:

You just use those 2:


Only 2 vars are needed, not 4 - have a look at my example.

Ok i think i follow this time. I’ll give it a shot

So i looked it over and just want to make sure i understand when you refer to the “You never use these variables in the character” are you referring to the ThirdPerson Blueprint or just in general?

The variables named Speed Set 150 and Speed Set 300 are nowhere to be seen being used in the 3rd person BP. At least we cannot see it.

The script I suggested does precisely what is mentioned in this post. Replicate it and punch in the desired numbers.

• 150 / 300 on Begin Overlap (we enter the village)
• 600 / 1200 on End Overlap (we leave)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.