Announcement

Collapse
No announcement yet.

Creating a Speed Modifier?

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

    Creating a Speed Modifier?

    My goal is to make my player character speed up for a few seconds when he runs through a small box volume . Does anyone know how to change the players speed through Blueprint using a box volume to trigger the increase/decrease? The image represents the mesh I am using as the Speed Booster.
    Attached Files

    #2
    You can use the 'SetMaxWalkSpeed' node, this is accessible from the character movement component....so you could create begin & end overlap events for the box volume and when the events are triggered you could call: get player character -> character Movement -> set max walk speed. I hope this helps
    [FREE] Procedural Bridge Blueprint, [FREE] Spline Enabled Ivy BP

    Comment


      #3
      It might be worth trying out the 'Launch Character' node too, this might give you the desired effect.
      [FREE] Procedural Bridge Blueprint, [FREE] Spline Enabled Ivy BP

      Comment


        #4
        Hey thanks! I figured it out and got it working pretty nicely

        Click image for larger version

Name:	SpeedBooster_BP.jpg
Views:	2
Size:	87.3 KB
ID:	1066292

        Originally posted by ULLS View Post
        You can use the 'SetMaxWalkSpeed' node, this is accessible from the character movement component....so you could create begin & end overlap events for the box volume and when the events are triggered you could call: get player character -> character Movement -> set max walk speed. I hope this helps

        Comment


          #5
          Okay, running into a snag now....I have it so the character speeds up upon entering the speed booster...but...is there a way I can piggy back one speed booster to another? Meaning...is there a way to allow the character to increase his speed even more if he still has time from the previous speed boost and makes it to another? Almost like a reset of time on the speed boost but also increasing the speed a little more. Does the way I am wording the question make sense? I apologize...I have been up since very early working in UE4.

          Comment


            #6
            I would have a base speed set as a variable, then a boost speed variable, then add it to your original speed. This way you could add it again and again and again...while easily being able to return to the base speed when the boost time has finished.
            [FREE] Procedural Bridge Blueprint, [FREE] Spline Enabled Ivy BP

            Comment


              #7
              Do you mean a speed variable independent of the default MyCharacter Speed? What I would like to do is set it up so that the moment the character enters the speedbooster he has a set amount of time before the speed boost ends but if he enters another speedbooster the time is extended. This is what I have so far but depending on how I wire the true false branch the character will either run fast indefinitely or only for the allotted time...

              Click image for larger version

Name:	SpeedBooster_BP_wip.jpg
Views:	2
Size:	156.8 KB
ID:	1066345

              Comment


                #8
                Oh, I see...one way to do this is to use a timer instead of a delay, it has a 'clear timer' node that can be called. There's probably other ways to do this though, look into using the Event Tick node's 'delta seconds'

                I hope this helps
                Last edited by ULLS; 02-11-2015, 12:07 PM.
                [FREE] Procedural Bridge Blueprint, [FREE] Spline Enabled Ivy BP

                Comment


                  #9
                  Originally posted by ULLS View Post
                  Oh, I see...one way to do this is to use a timer instead of a delay, it has a 'clear timer' node that can be called. There's probably other ways to do this though, look into using the Event Tick node's 'delta seconds'

                  I hope this helps
                  Ah, thanks! I am going to try and put this into my blueprint now and see if I can get it to work. Thank you very much!

                  Comment


                    #10
                    Ah man no luck so far...I am just going through the motions trying to see what will get the result I want but am still having no luck! Is it possible for you to show me how you would link it up? When I connect the timer I get nothing to happen...however when I use the delay it at least works with the delayed time....although as I've stated I want the player to have the ability to (if he makes it in time) be able to extend the effect by going through another speedbooster.

                    Comment


                      #11
                      I have tried all these variations with but the delay is the only one that actually makes the speedbooster change the player max walk speed. Should I be using entirely different nodes? The objective is to increase player speed upon entry into the speed volume (speedbooster) lasting 5 seconds before returning to the base speed unless the character runs through another speed volume (speedbooster) before the 5 seconds runs out upon which time an additional 5 seconds will be added...and so forth until it runs out. I can't seem to get the time to add...as it stands now...the only way the player can receive a boost is to let the time run completely out and then enter another speed volume (speedbooster). Any suggestions? I know the answer is staring me right in my face

                      Click image for larger version

Name:	SpeedBooster_BP.jpg
Views:	2
Size:	87.3 KB
ID:	1066440
                      Click image for larger version

Name:	SpeedBooster_BP_wip.jpg
Views:	2
Size:	156.8 KB
ID:	1066441
                      Click image for larger version

Name:	SpeedBooster_BP_wip2.jpg
Views:	1
Size:	111.9 KB
ID:	1066442

                      Comment


                        #12
                        Does anyone have any suggestions?

                        Comment


                          #13
                          Hi GameHatcher, did you not have any luck with the timer? The image you posted is quite low resolution but it looks like you are using it incorrectly. You should create a function that set's the speed and use the timer to call the function. Remember, it is not a delay and works by calling a function after the time specified not by delaying the BP flow.

                          So, in your blueprint, move the last set speed variable node into a function instead of calling it directly after the 'SetTimer' node. You'll then need to type the name of the function into the 'SetTimer' node rather than the name of the variable.
                          [FREE] Procedural Bridge Blueprint, [FREE] Spline Enabled Ivy BP

                          Comment


                            #14
                            Originally posted by ULLS View Post
                            Hi GameHatcher, did you not have any luck with the timer? The image you posted is quite low resolution but it looks like you are using it incorrectly. You should create a function that set's the speed and use the timer to call the function. Remember, it is not a delay and works by calling a function after the time specified not by delaying the BP flow.

                            So, in your blueprint, move the last set speed variable node into a function instead of calling it directly after the 'SetTimer' node. You'll then need to type the name of the function into the 'SetTimer' node rather than the name of the variable.
                            Thank you. I will try that...sorry for my lack of understanding.

                            Comment


                              #15
                              Originally posted by ULLS View Post
                              Hi GameHatcher, did you not have any luck with the timer? The image you posted is quite low resolution but it looks like you are using it incorrectly. You should create a function that set's the speed and use the timer to call the function. Remember, it is not a delay and works by calling a function after the time specified not by delaying the BP flow.

                              So, in your blueprint, move the last set speed variable node into a function instead of calling it directly after the 'SetTimer' node. You'll then need to type the name of the function into the 'SetTimer' node rather than the name of the variable.
                              Hello ULLS,

                              Is this the setup
                              Click image for larger version

Name:	SpeedBooster_BP_wip3.jpg
Views:	1
Size:	380.7 KB
ID:	1066576

                              If not can you tell me what I'm missing? It's not working, but I know it can. If I figure it out before you reply I will repost what I discovered. Thanks again for your help!

                              Comment

                              Working...
                              X