October 13, 2024, 04:39:53 AM
Welcome,
Guest
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
For WME related articles and tutorials visit
WME Resource Center
.
Home
Help
Search
Calendar
Login
Register
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Reset Game
« previous
next »
Pages: [
1
]
Print
Author
Topic: Reset Game (Read 4988 times)
0 Members and 1 Guest are viewing this topic.
SBOVIS
Frequent poster
Karma: 0
Offline
Gender:
Posts: 404
FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
Reset Game
«
on:
May 31, 2007, 04:20:00 PM »
Hi,
I want to at the end of the game to move the player to a start screen (no problems with this) and also reset all the variables, global and local, reset all items taken or deleted and reset all states regarding rooms visted etc.
Basically reset all to the state the game started in.
Can this be done easily??
Also will game saves still be usable after this reset?
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS
Mac
Supporter
Regular poster
Karma: 0
Offline
Gender:
Posts: 136
Re: Reset Game
«
Reply #1 on:
May 31, 2007, 04:51:09 PM »
I think Game.Reset() should do it.
Mac
Logged
SBOVIS
Frequent poster
Karma: 0
Offline
Gender:
Posts: 404
FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
Re: Reset Game
«
Reply #2 on:
May 31, 2007, 05:05:39 PM »
yes I tried this but it does not reset windows or items that have been deleted.....I think?
Mnemonic can you confirm??
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS
Mnemonic
WME developer
Administrator
Addicted to WME forum
Karma: 41
Offline
Gender:
Posts: 5683
Re: Reset Game
«
Reply #3 on:
May 31, 2007, 05:08:47 PM »
To quote the docs:
"This method deletes all scene states, selected responses, sets timer to zero and also clears all global variables, except those holding game objects (such as windows or entities). Use this method if you want to start a new game."
It should reset the deleted items though.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum.
SBOVIS
Frequent poster
Karma: 0
Offline
Gender:
Posts: 404
FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
Re: Reset Game
«
Reply #4 on:
May 31, 2007, 05:18:41 PM »
ok Thanks, But if items are left in the inventory and the inventory is a window will this not be effected?? So the game will begin again with items that were in inventory at the time the reset happened??
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS
Mnemonic
WME developer
Administrator
Addicted to WME forum
Karma: 41
Offline
Gender:
Posts: 5683
Re: Reset Game
«
Reply #5 on:
May 31, 2007, 05:25:35 PM »
No, the game basically reloads the items.items file.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum.
SBOVIS
Frequent poster
Karma: 0
Offline
Gender:
Posts: 404
FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
Re: Reset Game
«
Reply #6 on:
May 31, 2007, 05:28:33 PM »
ah ok, thanks, so what does this mean when windows with objects are not effected??
I have windows for on sceen objects, will I need to close these down first before reset??
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS
Mnemonic
WME developer
Administrator
Addicted to WME forum
Karma: 41
Offline
Gender:
Posts: 5683
Re: Reset Game
«
Reply #7 on:
May 31, 2007, 05:34:41 PM »
Yes, you're responsible for the windows. The Reset() method intentionally doesn't destroy any loaded game objects, because it might be quite destructive for some games.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum.
Print
Pages: [
1
]
« previous
next »
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Reset Game