Posted By: xbox
[SOLVED] changing levels [yes another one of these] - 09/24/13 19:08
Thanks to 3run, it was discovered that the problem somewhere lied in using multiple main files. After combining them both to make one, large file, everything seems to work just fine.
Sorry for yet another thread about changing levels. I feel like they pop up all of the time.
I have 4 separate levels for my game, and 2 main scripts. 1 is the main file where "main" is run but also contains an action for an entity to assist with the player changing levels. The 2nd the player code. The player code deals with the player physics and camera stuff.
First issue is when I select the level from the menu panel i create in "main", If I select the 3rd level or 4th level initially, then the entities placed from WED load properly and the physics on the player work properly. However, when I initially choose level 1 or 2, and change levels to 3 or 4, the only entity that loads is the one to assist in level change, all other entities are not loaded.
Second issue is, I can load any level initially and have everything (entities, and physics) work perfectly, but once I change levels, the physics get screwed up and my player slides all over the place.
Here is the code for the main script,
...and the second file...
Sorry for yet another thread about changing levels. I feel like they pop up all of the time.
I have 4 separate levels for my game, and 2 main scripts. 1 is the main file where "main" is run but also contains an action for an entity to assist with the player changing levels. The 2nd the player code. The player code deals with the player physics and camera stuff.
First issue is when I select the level from the menu panel i create in "main", If I select the 3rd level or 4th level initially, then the entities placed from WED load properly and the physics on the player work properly. However, when I initially choose level 1 or 2, and change levels to 3 or 4, the only entity that loads is the one to assist in level change, all other entities are not loaded.
Second issue is, I can load any level initially and have everything (entities, and physics) work perfectly, but once I change levels, the physics get screwed up and my player slides all over the place.
Here is the code for the main script,
Click to reveal..
Click to reveal..