Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Ayumi, Akow, AndrewAMD), 1,505 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to restart a game? #233016
10/25/08 22:13
10/25/08 22:13
Joined: Sep 2004
Posts: 130
Italy
Alessandro Offline OP
Member
Alessandro  Offline OP
Member

Joined: Sep 2004
Posts: 130
Italy
Hi,

I made a trivial game (just to better understand and study some key concepts). The game is fine, but the problem is as soon as the game is finished (player won!) I need to restart the game self.
I red that level_load load a level and clear everything. But if I need to stay in the same level, is there any function to clear and restart everything without deleting variables, actions, entities, etc... by hand (like level_load)?

Thank you!

Re: How to restart a game? [Re: Alessandro] #233019
10/25/08 22:43
10/25/08 22:43
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
make a function that´s doing that.. and call it...
So you just need to call the function instead of reset everything by hand.


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: How to restart a game? [Re: Espér] #233035
10/26/08 01:46
10/26/08 01:46
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
You can use level_load. There are no variables reset, actions deleted or something like that. The engine will just load the level anew and reinitialize the entities, i.e. their actions are restarted. This is exactly what you wanted if I understood you right.


Always learn from history, to be sure you make the same mistakes again...
Re: How to restart a game? [Re: Uhrwerk] #233048
10/26/08 10:07
10/26/08 10:07
Joined: Sep 2004
Posts: 130
Italy
Alessandro Offline OP
Member
Alessandro  Offline OP
Member

Joined: Sep 2004
Posts: 130
Italy
Yes, thank you. I asked to myself if there were ohter functions other than level_load (I need to load the same level).
Thank you for your help, I will use level_load :-)

Re: How to restart a game? [Re: Alessandro] #233251
10/27/08 17:56
10/27/08 17:56
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
I just wanted to say, absolutly right! Level_load is the best thing. I had
this prob too...after 1 year of working...there were sooooo many skills to set
to null after a restart...thanx for LEVEL_LOAD and stuff smile


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1