The "MAIN" goal for me in this project was to create a combo system and a weapon inventory system that I would be able to reuse in future projects. In this project me and my teammates decided to try and work with the GAS ability system in Unreal engine. It saved a lot of time, less code and made debugging far easier. I learned different ways of creating the same system but working sightly different. One example would be the different solutions for damage registration when a players attack animation speed reaches the point of frame skipping.
Inside the combo system I am using a lot of animation notifies to be able to control when stuff happen. This way its very easy to track when they player should be able to click inside the combo frame in order to be able to transition from attack 1 to attack 2. For the attack I have a collider that is on the player that activates only on the frames when the attack is happening. With the help of GAS system I tell the player that they are able to do the 2nd attack only if they have the tag combo1 from inside of the first attack. To make sure that the player does combo 2 attack instead of one they get a tag called attack1 and that prevents the player from using it until they have finished an attack combo or animation. The logic is the same for every other attack until the final one which is a combo finisher.
In my jump attack I end up using animation notify to call the explosion. The explosion is a simple sphere collider that gets created when the notify is called and expands until it reaches a specific size and than gets destroyed. The explosion can also last a specific time instead if its HitboxLifeTime is higher.
1. Player Pickup Logic
Function:TryPickupWeapon()in my character class
How it works:
Gathers all overlapping actors of type AWeaponPickUp(GetOverlappingActors).
If at least one is found, it calls PickupWeapon()on that actor.
Otherwise, logs “No valid weapon pickups found.”
This keeps the player’s side clean—just one function to scan and trigger a pickup.
2. Weapon Pickup Actor (AWeaponPickUp)
Collision:Uses a USphereComponent(radius 50) to detect when the player enters/exits pickup range.
Pickup Method:
Checks the stored player and a valid WeaponClass
Finds the player’s UWeaponInventoryComponent
Spawns a new AWeaponBase, adds it to the inventory, then Destroy()s itself
This modular actor handles everything related to “touch and collect” behavior.
3. Weapon Inventory Component (UWeaponInventoryComponent)
Storage:Holds a TArray<AWeaponBase*> WeaponSlots
AddWeapon():
Appends the new weapon
Auto‑equips it if it’s the first one
Logs the full inventory to console and onscreen (great for debugging!)
EquipWeapon(int32 SlotIndex):
Hides & detaches all other weapons
Attaches the chosen weapon to the character’s hand socket
Updates the HUD widget icon with the weapon’s UTexture2D
SwitchWeapon(int32 Direction):
Moves the equipped index up or down (wraps around at ends)
Calls EquipWeapon()again to apply the change
Because it’s its own component, the inventory logic stays neatly separated from character movement or input code.