Page Info
Skill Level:
Engine Version:

2 - Updating the Character Blueprint

Choose your OS:

In this step, we create some script inside our Character Blueprint to allow us to signal our Animation Blueprint that we are firing a weapon.

  1. Inside the Content Browser under Content/AnimStarterPack, open the Ue4ASP_Character Blueprint.

  2. Locate the Crouching section, and delete the InputAction Crouch Event (with the Warning!) sign.


    There is a warning on this node because our project is not set up to use the InputAction event "Crouch".

  3. Right-click in the graph and add a C Key Event and connect as shown below.


    We have just associated crouch now with the C key press, you can change this input to whatever you would like.

  4. In the MyBlueprint window, click the Add Variable button to create a Boolean variable and call it Fire Button Down.


  5. Right-click in the graph and add the Left Mouse Button Key Event.

  6. Holding Alt, drag the Fire Button Down variable in the graph to create a Set node.

  7. Repeat the previous step (or copy the Set node) and connect as shown below.


    Make sure that Fire Button Down is True when Left Mouse Button is Pressed and False when Released.

  8. Select CapsuleComponent in the Components window, then in the Details panel check the Hidden in Game option.


    This will turn off the debug display of capsule's collision.

  9. Compile and Save then close the Blueprint.

Our character is now set up to send signals to our Animation Blueprint when we are crouching or firing a weapon. In the next step, we will set up our Animation Graph inside our Animation Blueprint to handle the blending of our Anim Montage with our normal movement animations so that we can blend between the two.