SylenthX Posted December 23, 2014 Share Posted December 23, 2014 Hello everyone, I am creating a game where the player has to use physics to navigate the level, such as stacking objects to create stairs to get to a point, etc. In said game, the player can accidently drop objects off the level or get them destroyed by other forces. I would like to implement a feature where the player can hit a key and the level and all scripts, lighting, etc. is reloaded. This code must be in C++. How can I do this? Please help. Thanks. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted December 23, 2014 Share Posted December 23, 2014 Pseudo: if (window->Key:R) { world:Clear(); Map::Load("Maps/start.map"); } Note that when you clear a world, you also remove the cameras. So if your camera is created via code in the start level, you will also need to create a new camera via code. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.