I have a Game mode Blueprint which controls the logic for my game. In this Blueprint there is a “Get All actors of Class” which gets my max Score by finding all instances of “BP_Target”. When I click Play on that level (Level1) it works fine. However, When I start the game from my Main Menu and click play which just loads up “Level1”, the “Get All Actors of Class” Returns 0.
Blueprint Logic:
So the problem is your “Game Logic” Event isn’t being called! It’s an event, but that event isn’t being told to do its thing! Ask yourself, why is it working outside of starting the level from the main menu, because even hitting play on Level 1… it shouldn’t work.
So figure out why your score IS working, try a search in the bar at the bottom of the game mode screen and search the whole project for “GameLogic”. Maybe that will give you the clue you need!
Put a delay between “GameLogic” and “GetAllActorsOfClass.”
Say… a delay node with a value of 0.2. If that doesn’t work try 0.8.
This SHOULD be easy, because I believe what is happening is the GameLogic is seeking out actors that haven’t loaded in yet! A little delay to let them get set up and it should be fine! (This is why loading screens exist )