How to make level missions in c++?

I have no idea how to do it, like when you loading next level mission should be updated but i dont know how, anyone can help?

I recommend storing your mission data in a GameMode, GameState, or GameInstance (it doesn’t really matter which one in single player). You can refer to Load and Unload Levels with C++ | Unreal Engine 4.27 Documentation for information on how to manage levels in C++. In addition, you may wish to look into Saving and Loading Your Game | Unreal Engine Documentation.

I can provide better information if you explain specifically what you are having trouble with.

thank, but how to make character understood which level is current

Sorry for the late reply. If you store the mission data in, e.g., a custom GameInstance class, then you could access it from your player like this:
YourGameInstance* GI = Cast<YourGameInstance>(UGameplayStatics::GetGameInstance(GetWorld()));
if(GI.currentLevel) //Check current level

If you choose a system that relies more on saved data, then refer to the aforementioned links.

EDIT: I fixed a few mistakes in the code.

Thank you

This topic has been moved from International to Programming & Scripting: C++.

When posting, please review the categories to ensure your topic is posted in the most relevant space. This post has been moved to help other devs with similar questions.

Thanks and happy developing! :slight_smile: