Universal Monster
  • Universal Monster v1.4.3
  • Overview
    • Changelog
    • Integrations
      • FPS Multiplayer Template 4.0
      • TPS Multiplayer Pack
      • Survival Game Kit v2
      • Survival Game Kit v1
      • Easy Survival RPG v4.0
      • Horror Engine
  • Features
    • Monsters
      • Character Blueprint
        • BP_UMComponent
        • BPI_UniversalMonster
        • Collision Settings
        • Animation Settings
        • Sound Settings
      • Animation Blueprint
    • Combat System
      • Attacks Array
      • Melee
      • Projectiles
      • Timers
      • Bullets
      • Trace Info
      • Player Attacks
    • Behavior System
      • Behaviors
      • Tasks
        • Wait
        • Animation
        • Move
        • Find
        • Flee
        • Hide
        • Locate
        • Return
        • Chase
        • Maneuver
        • Attack
    • Faction System
    • Group Formations
    • Conditions
    • Data Tables
Powered by GitBook
On this page

Was this helpful?

  1. Features
  2. Combat System

Melee

PreviousAttacks ArrayNextProjectiles

Last updated 3 years ago

Was this helpful?

Melee attacks utilize Montages with Montage Notify Windows to determine when the Melee trace should occur. Universal Monster uses Montages so that the same animation can be used to create multiple types of attacks. If you were to modify the base Animation instead, this would be triggered every time that Animation is played, whether it is played inside a Montage, as a Dynamic Montage, or as an Animation.

Creating A Melee Attack

I setup 3 attacks using all 3 Montages I created in the first step. I then chose to Randomize each of them so the character would use a random attack each time, if it is not on cooldown of course. One of the attacks was a combo attack with 2 Hit Traces, so I gave this a cooldown of 3 seconds +/- 0.5 seconds while the other 2 attacks have no cooldown. If you have custom Damage Types, you can use them here. Refer to the Attacks Array section for more information.

Navigate to the Melee attack animations and select the ones you wish to use, then right-click on one, hover over Create, then click Create AnimMontage
New Montage files will be created for you and they will already be selected so you can hit Enter to open them
Press the Pause button to make it easier to find the exact positions to trigger the Melee Hit Trace
Drag the red slider to the frame in which you want the Hit Trace to start, then right-click on the line, under the red slider, in the Notifies section, then hover over Add Notify State and choose Montage Notify Window
Drag the red slider again, this time to where you want the Hit Trace to end, then drag the right side of the AnimNotify to the line under the red slider
Select the AnimNotify, then, in its details, give it a Notify Name, then save the Montage file
You can do multiple Hit Traces during the same Montage
Open your Character Blueprint, select the Mesh
Click Add Component and add a Box Collision Component
Rename it to match the Notify Name from earlier (case-sensitive)
In the Box Collision Component's details, click the magnifying glass under Sockets to attach it directly to a bone, then adjust its Box Extent, Location, and Rotation
In your character's list of components, select BP_UMComponent
Add an attack to the Attacks Array and configure it using the Montage you created earlier