Preview Window does not reset the game state

Found a bug? Post information about it here so we can fix it!

Moderator: Moderators

Post Reply
User avatar
jonaspm
Posts: 89
Joined: Fri Jul 06, 2012 3:51 pm
Contact:

Preview Window does not reset the game state

Post by jonaspm »

Hello everyone :) i have a problem :S

When i preview the game, i expect that when i push the stop button, the game will reset to it's original settings (just as before the preview) but the game stays as it was before stopping...

¿Did you understand? sorry for my bad english :S
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi jonaspm,

This is not a bug, it's a very convenient feature. It allows you to permanently set properties / data from your project itself ( which is ideal for level editing and such ).

Simply make sure to reset any values that need to be reset using a ZExpression .. you're going to need / want to do this sooner or later anyway ( for instance after a "Game Over" ).

K
User avatar
jonaspm
Posts: 89
Joined: Fri Jul 06, 2012 3:51 pm
Contact:

Post by jonaspm »

Oh! I see

And... ¿Is there any way to disable it?

That would also be useful :)
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi jonaspm,
jonaspm wrote:Is there any way to disable it?
Nope. You could always use F9 to build & run a standalone version of your project though.

Anyway, can you explain the situation where you wanted your project to revert back to the way it was before previewing your ZApplication?

K
User avatar
jonaspm
Posts: 89
Joined: Fri Jul 06, 2012 3:51 pm
Contact:

Post by jonaspm »

Wel i configured the initial position of the main character, the default initial rotation and all of that and i just wanted to test the game...

But when i saw the preview, the initial settings became a mess
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi jonaspm,
jonaspm wrote:Wel i configured the initial position of the main character, the default initial rotation and all of that and i just wanted to test the game...

But when i saw the preview, the initial settings became a mess
You should set the initial position / rotation of the SpawnModel component, not the Model itself ;)

K
Post Reply