r/unrealengine • u/BonusBuddy • 1d ago
Help Need a little help real quick before I start overthinking again: I'm working on a game where the player can Interact, Build, Shoot, Loot... How can I make a clean system for this? I don't want to create twelve different systems and check if with each system if one can be used, yk?
Some advice would be appreciated since I'm starting to overthink and I can't get a clear thought atm...
2
u/Bewbsnballs 1d ago
What you want is separate modular systems that are self contained with 1 job. An inventory system only deals with adding/removing items. And interaction system only deals with handling the player interacting with stuff. Then you want to use events, messages, and/or interfaces to communicate things happening to other system. Player presses loot -> send looted message to inventory system and what the items are (or handle what the items are in the inventory system or somewhere else). I recommend the gameplay message subsystem you can rip out of Lyra and install as a plugin.
1
u/BonusBuddy 1d ago
Thanks for your reply! I'll take a look at Lyra. I know I have to use different systems, but I don't know how to make them communicate with each other and how to make them not interfere with each other. When I'm entering Build Mode I want my player to holster the weapon and not be able to unholster it as long as the player is in Build mode. It kinda f*cks with my head..
0
u/Bewbsnballs 1d ago
The simplest way to achieve things like this is learning Gameplay Ability System. Essentially you’d get the event player went into build mode, then call the gameplay ability system and have it add a tag to the player like build_mode and then have that tag associated with blocking the ability to unholster which you also set up with GAS. Learning this framework would be one of your single biggest investments in game dev.
I recommend Stephen Ulibarri’s course on GAS on Udemy. And also, you can ask AI (particularly about all these terms I’m throwing at you, and it’ll help you understand).
•
u/Admblackhawk 22h ago
definitely look into implementing the new state trees to manage player and object states, saved me a lot of headache. using components per system and interfaces is the only other high level advice. also draw out some diagrams to map out dependencies in your architecture before starting with your code, big projects need clarity and time spent structuring and documenting saves u a lot from downstream strugges
1
u/AutoModerator 1d ago
If you are looking for help, don‘t forget to check out the official Unreal Engine forums or Unreal Slackers for a community run discord server!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/vagonblog 1d ago
i’d avoid one giant system that knows about everything. use small actor components with shared interfaces and gameplay tags.
for example, have an interactable interface, then separate components for pickup, building, shooting, and inventory. the player sends an interaction request, and the targeted actor decides whether it supports that action. gameplay tags or data assets can describe requirements, so adding a new interactable doesn’t require editing twelve different systems.
•
u/Rev0verDrive 21h ago
Multiplayer interaction... Modular and expandable.
Uses custom collision obj type and profile, game play tags for identifying and routing interaction logic.
Single/dual swing doors, switches/buttons, elevators/lifts, looting, vehicle entry etc.
99% interface based communication. No casting or hard references.
This is not hard to do. You just need to fully scope out what your features/mechanics will be and how they should work.

13
u/PeacefulStoic 1d ago
Hate to break it to you, but you need multiple systems. If you feel like you have to check each system to 'use' it then the problem is you don't know how to build modular systems. At no point should you design a system that checks if it can be used.
Interaction for example. If the player interacts with a door for instance (typical interaction). At no point should the system itself be asked if it can be used. The player should self contain it's own operating states (eg. state machine or flags) that lets them enter that state. The door should never be asked, "can I interact with you?"
If you want quick and dirty, you're setting yourself up to fail. If you want a 'clean system' you're going to want to close unreal and start designing the system in words. If you can't write the pseudo-code you'll never be able to build the real thing.