Combat system (Part 1) attack anim

Combat (Part 2) random anim & sound



Randomly execute different attack anim


Retarget these 2 anim from the anim pack. and their montage anim (from part 1):
image.png

Go to 3rd person BP event graph, add Random Anim Custom event and integer variable AttackNum:
(Assume use 2 anim above)
Graph as below:(If anim equal to 0, will execute 0 (original), if false, will exeute anim 1, etc)
image.png

Replace with random anim function in Attack custom node made in Part 1:
image.png

Add DelayDuration Float variable, add on end of anim montage nodes:
image.png
Also on part 1 attack graph:
image.png

Add random sound effect:


Import wav sound file (not mp3)
adjust pitch and volume if wanted by clicking the file
image.png
Open 3rd person BP, add sound location and location actor node
image.png

Create a sound cue, name as Punchsoundcue
image.png
Drag the sounds files in the cue graph and graph:
image.png
Change the sound in play sound node:
image.png

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.