I’ll have a look at that video when I get the chance. In the meantime, does all this new code go on the BP for the game instance, or on the Goal actor’s BP?
Right now, the Goal one is complaining that it “could not find the function ‘CompleteLevel’ called from CompleteLevel,” even though that function does exist in the interface.
Idk if this is because of Blueprintue, but this needs to expose the variable you are changing:
Just to clarify: In my case BPI Simple Interact is a blueprint interface I used to have it trigger with the character. You can do anything here as long as it triggers CompleteLevel event to move to next level. It could be reaching max point, arriving at X location, overlapping X actor, etc…
Aside from that think it’s the same from what I shared. Is it working as you expect or giving you any problems?
I haven’t been able to test it yet, since I get an error or caution when I compile what I have. So, the BPI Simple Interact is a custom event, or do I need to do more than just make it a custom event?
I’m not sure how the “LevelStructure” there has an end quotation mark on the end, but it doesn’t in the actual program. Would I have add a Set Level Structure (by ref) to connect the “Set members”’ linking and Struct Out nodes?
I put in a Print String node at crucial points to determine if the game would either go ahead and call parts of the BP or wait. But, every time I did a test run, the print string would print on the screen at the very start. This means the code must be doing everything at once when it isn’t supposed to. It occurs before the level is even supposed to be considered finished.
After checking the “IsCompleted” box under the first array member on the array variable in both the Goal and instance BPs, the game still started at Level 1. I even tried throwing in an int + int node in attempt to make the LevelNumber increase by 1 for each time the goal is reached, but nothing seems to work. I feel like I’m missing something, but I’m not sure what. Other than maybe throwing in a node that checks “IsCompleted” for an array member, if possible.
What condition have to be true for the level to be completed? If you can run a single print node when that happens, then you will also be able to call Complete Level.
The “Goal” actor must be powered; when it is powered, it changes from its “default” material to its “powered” material. When the Goal actor is triggered in this way, that is when the game must advance to the next level.
I have the Complete Level node after the BP Simple Interact event’s starting node. When I put in a Print String, it wasn’t triggered until the Goal object’s status changed. I think I’m on the right track, but I have a feeling I might be using the wrong variable.
Since nothing seems to trigger the BP Simple Interact event, I wonder if I should put in a Boolean that only applies to Goal objects that is set to true every time a Goal object is powered up. That way, whenever the Boolean is true, the program would know if the conductor is a goal object or not. Might that work?
Here is an update on the program, sharing the four BPs and clumping each set of nodes as cleanly and closely as possible.
After taking a break, fighting off a stomach bug and looking over the BPs, I figured that I would try declaring a Boolean variable that is supposed to help the demo distinguish between Conductor and Goal objects, so that the game would load the next level when the Goal object is triggered. As you will see in the BPs, there are several Print Strings I put in to test the process. Right now, all the Print Strings print at once, as soon as the Goal object changes to its “powered” material (as seen in the included screenshot), indicating virtually the entire program executes when parts of it aren’t supposed to.
After finding this video – UNREAL ENGINE 4 - LOAD NEXT LEVEL - YouTube – I decided on what to do. What I will do is make copies of the Goal entity and have each one use the Open Level function by name, and each Goal entity will be assigned to a specific level.