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
  • Creating A Bullet Attack
  • Bullet Montage
  • Bullet Attack
  • Bullet Info

Was this helpful?

  1. Features
  2. Combat System

Bullets

PreviousTimersNextTrace Info

Last updated 3 years ago

Was this helpful?

Universal Monster has a custom Line Trace that is affected by Gravity, Wind and Drag, which makes it perfect for Bullets. The Line Trace is done instantly, so it does not take into account travel time, but it does account for the distance a Bullet would travel over a certain amount of time.

Creating A Bullet Attack

Bullet Montage

Similar to creating a Melee or Projectile attack, you must create a Montage for the Bullet attack. Refer to the Melee section by clicking the link below if you do not know how to create a new Montage.

Bullet Attack

The Bullet attack does not need any more information configured in the Attacks Array because it will pull its attack information from the Get Bullet Info interface function in BPI_UniversalMonster.

Bullet Info

Bullets must have Bullet Info in order to run their trace and do damage. You will need to add a new variable to your character using the struct S_BulletInfo. You can then configure this variable with default settings and then pass it along in the Get Bullet Info interface function. If you have multiple weapons that need to have different Bullet Info settings, then you can make this variable a map or array so that you can choose the different settings when needed. The ESRPG example uses a map of Static Mesh to S_BulletInfo which sends different settings depending on the currently equipped Static Mesh.

Data Table Row: You can store your Bullet Info in a data table. Location: The location to start the Bullet trace. Direction: The initial direction of the Bullet trace. Speed: The initial velocity of the Bullet trace. Accuracy: Value from 0 to 100 to determine the accuracy of the Bullet trace, which will add a rotation offset to the Direction. Accuracy Multiplier: Angle, in degrees, to offset the Direction when Accuracy is 0. Time: Number of seconds used to simulate the Bullet trace. The trace is still done instantly. Traces: Number of traces to calculate. The higher the value, the more accurate the Bullet trace, but it will cost more in performance. Drag: Amount of velocity subtracted from the current velocity every second of the Bullet trace. Gravity: Accelerates the Bullet by the chosen vector. Default gravity is (0, 0, -980). Wind: Offsets the Bullet by the chosen vector. This vector is randomized during the Bullet trace to provide a more realistic simulation. Trace: The trace settings to use for the Bullet. Enable Debugging?: Should the traces be shown for debugging? Debug Draw Type: Show the trace for a single frame or a duration. Debug Trace Color: Color of the trace before a hit occurs. Debug Hit Color: Color of the trace after a hit occurs. Debug Draw Time: The duration to show the trace.

BPI_UniversalMonster
Melee
Just like the Projectile, the Bullet only needs a Montage Notify, instead of a Montage Notify Window
The Notify Name must be set to Bullet (case-sensitive)
In order to fire a Bullet, you must create a Bullet attack within the Attacks Array using the Montage you created and set the attack Type to Bullet
Create a new variable and change its Variable Type to S_BulletInfo
Configure your Bullet Info settings