This week was longer than I hoped. The lead programmer and the lead designer wanted the puzzle API working in the game this Saturday. The API was done, and just needed testing on Wednesday. When we tested the API nothing could be worse.
At first the Code crashed the engine. This was because the game was trying to access an element of an array that didn't exist. This was fixed by keeping the array of puzzles inside the puzzle manager class. Then call the array in the blue prints.
The second issue was the puzzles were never initialized. My lack of Unreal blueprint knowledge caused this mistake. I never connected the execution pins to call the functions. Solving that problem lead to the game crashing. The base puzzle class is type UObject, this is so they can be created during run-time and don't have to have an actor component. In the init functions an iterator is being used to find all the actors with certain tags.
TActorIterator<AActor> actorItr = TActorIterator<AActor>(GetWorld());
I was using this function to search through the game to find all the actors with the tags that were passed in as parameters. Since the puzzle class was an UObject, it doesn't have a world location and will always return null. To work around this. The puzzle manager is passed into the class, the puzzle manager is a AActor. The puzzle class also needed to get the puzzle manager to notify the manager when the puzzle was complete. So it wasn't a waste that the manager was passed into the class.
This week has been filled with problems and hard work. Overcoming these obstacles made me understand Unreal more. I am glad not just because the API is working but because I became a better programmer.