Event calls from actors of a certain type
I have a problem that I can't seem to find a solution to. I have a scene where one or more players collect coins, which are spawned randomly during runtime. Colliding with the coins and removing them is all fine, but I also want the level blueprint to recognize that a coin has been picked up.
My initial idea was to create an event which is fired by a collected coin, and then picked up in the level blueprint. But all examples, provided by my good friend Google, seem to be examples where the actor is already in the scene when the scene is loaded. Furthermore, the event in the level blueprint is always bound to a single entity.
Is there a way to create an event in the level blueprint, which can be fired from any given coin in the scene?
asked Oct 10 '16 at 01:51 PM in Blueprint Scripting
Referring to the Level Blueprint from outside of it can cause some problems, especially once you move to another level and begin to use the same blueprints. This is why we don't allow referring to functions and events made in the Level Blueprint.
It would be best if you could use a GameInstance instead. GameInstances are made to persist between levels and last throughout the entire play session. You could set up any of those events that you planned to use in the Level Blueprint. All you need to do to get that set up is to create a blueprint based off the GameInstance class and then set your GameInstance in Edit > Project Settings > Maps & Modes to your new blueprint class.
answered Oct 11 '16 at 06:35 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here