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

Was this helpful?

  1. Features
  2. Combat System

Projectiles

PreviousMeleeNextTimers

Last updated 3 years ago

Was this helpful?

Universal Monster comes with its own Projectile System which differs slightly from the creation of standard Unreal Engine Projectiles. Instead of utilizing a Hit Event, UM's Projectiles utilize the UM Trace in the same fashion as the Melee attacks, which guarantees that a very fast moving Projectile does not miss triggering a Hit Event and move through objects it should be hitting.

Creating A Projectile

1) Meshes are optional, but are an easy way to give your Projectile the shape and color you want. 2) A Box Collision Component, with any name, must be present in the Projectile blueprint or it will never trigger any hits. You can even include multiple Box Collision Components if you want your Projectile to have more than one Hit Box. 3) You can add Particle Systems and Sounds or any other component, this is all optional.

One exception to the No Collision preset is when you need to have a component Simulating Physics. This specific component can be set to the necessary Collision Preset so that it works as expected. An example may be a bolas Projectile which includes cords/chains with multiple weighted balls attached to it. You may want the balls Simulating Physics and the cords/chains setup as a Cable Components with a Physics Constraints.

Creating A Projectile Attack

Projectile Montage

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

Projectile Attack

Make sure to also fill out the rest of the attack info such as the Hit State, Min/Max Range, Min/Max Damage, Crit Chance and Multiplier as well as the Cooldown and Cooldown Variance. You can also add Conditions, Costs and Effects as needed.

Projectile Info

Data Table Row: You can store your Projectile info in a data table. Projectile: The Projectile blueprint to spawn for this attack. Projectile Pattern: You must have at least one location in this array. The pattern allows you to create an arrangement of Projectiles based on location relative to the spawn point of the Projectile. Location: Add a location offset to the spawn point of the Projectile Pattern. Rotation: Add a rotation offset to the Projectile Pattern. Scale: Adjust the scale of the Projectiles in the Projectile Pattern. Pause Montage?: Should the montage be paused while spawning the Projectile Pattern? Number Of Shots: Total number of times the Projectile Pattern is spawned. Projectiles Per Shot: Total number of Projectile Patterns per shot. Delay Between Shots: Delay, in seconds, between each spawn of the Projectile Pattern(s). Spacing: Horizontal distance between each Projectile Pattern when there are more than one per shot. Angle: Spread of the Projectile Patterns, in degrees, when there are more than one per shot. Initial Speed: Starting velocity of the Projectile Pattern. Max Speed: Maximum velocity of the Projectile Pattern. Gravity: Rate at which gravity affects the Projectile Pattern. Bounciness: Determines how much the Projectile Pattern will bounce. Friction: Rate of slowing down the Projectile Pattern. Homing?: Should the Projectile Pattern follow the target? Homing Acceleration: Rate at which the Projectile Pattern accelerates towards the target. Despawn Range: Maximum distance from spawn point of the Projectile Pattern. Life Span: Maximum time the Projectile Pattern is allowed before it is despawned.

Melee
Navigate to UniversalMonster\Blueprints, then right-click BP_UMProjectile and choose Create Child Blueprint Class, then give your blueprint a new name and move it to a better folder
Add any components you need to make your projectile look how you want it to look
All components should be set to No Collision and do not need to Generate Overlap Events
Instead of adding a Montage Notify Window, the Projectile only needs a Montage Notify
The Notify Name must be set to Projectile (case-sensitive)
In order to utilize any Projectile, you must create a Projectile attack within the Attacks Array using the Montage you created and set the attack Type to Projectile