I’m quite new to Unreal and I’ve been really excited about it so far. I have some very basic understanding about blueprints, c++ and games in general. My question is the following:
I was thinking about using GameMode to store some sort of event emitter that I can use to notify relevant entities in my level (not necessarily actors) that something happened.
A good example would be my quest system: I designed my quest objectives as simple UObjects as there’s no need for them to be actors, but I wanted each quest objective to subscribe to their topic of interest, for example an enemy killed or an item added to inventory. The flow would be:
- I create an event emitter in GameMode
- Quest initializes
- objetive subscribes to enemy killed event
- Enemy dies → notify my event emitter
- Quest objective updates
Would that be a good approach? Or would there be a more recommended place to emit that sort of events? One of the reasons I’m tempted to use GameMode is that I believe have access to it even from non-actor classes.