Weapon Utils
Introduction
A Blueprint Function Library class used to manage weapons
Dependencies
The WeaponUtils
relies on other components of this plugin to work:
- Logger: Used to log useful information to help you debug any issues you might experience
API Reference
Functions
Name | Description | Params | Return |
---|---|---|---|
EquipWeapon | Equip a weapon to a character | Owner (AUSKCharacter*) The owner character WeaponClass (TSubclassOf The weapon class to equip |
Blueprint Usage
You can use the WeaponUtils
using Blueprints by adding one of the following nodes:
- Ultimate Starter Kit > Weapons > Equip Weapon
C++ Usage
Before you can use the plugin, you first need to enable the plugin in your Build.cs
file:
PublicDependencyModuleNames.Add("USK");
The WeaponUtils
can now be used in any of your C++ files:
#include "USK/Weapons/WeaponUtils.h"
void ATestActor::Test()
{
UWeaponUtils::EquipWeapon(Owner, WeaponClass);
}