Gamestudio Links
Zorro Links
Newest Posts
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
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TedMar, AndrewAMD), 1,344 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Re-initiating the application/script? #374336
06/17/11 18:29
06/17/11 18:29
Joined: Apr 2011
Posts: 67
Balkan
Pavle Offline OP
Junior Member
Pavle  Offline OP
Junior Member

Joined: Apr 2011
Posts: 67
Balkan
Does anybody knows if there is a way to re-initiate(restart) the application/scripts without exiting from it, or to re-initiate(restart) one particular script? By re-initiating the application/script I mean re-initiation of everything (all actions, functions variables) but without using the game_load/game_save instruction.


>>Demos free3DModels Tutorials<<
>>>>>>> by Pavle Nikolic <<<<<<<
Re: Re-initiating the application/script? [Re: Pavle] #374365
06/18/11 02:30
06/18/11 02:30
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
hmmm...

define only empty pointers intially for the things which are able to be changed. e.g. PANEL* pnl; instead of PANEL* pnl = { ... } (then use pan create) and/or use the linked lists or pVars to remove everything and call main() again when you need it?

Re: Re-initiating the application/script? [Re: MrGuest] #374375
06/18/11 08:07
06/18/11 08:07
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
no, not main!
you can create a function which creates all your needed assets and sets all variables up. then before you start you full game, run this function.
on reset you only have to call it again and you'll get happy


Visit my site: www.masterq32.de
Re: Re-initiating the application/script? [Re: MasterQ32] #374394
06/18/11 11:45
06/18/11 11:45
Joined: Apr 2011
Posts: 67
Balkan
Pavle Offline OP
Junior Member
Pavle  Offline OP
Junior Member

Joined: Apr 2011
Posts: 67
Balkan
Thanx to both of you for suggestions, I was hoping that there would be an easier, more automatic way to do this:) The function-based approach will not be satisfactory since I need to really re-initiate the entire thing.

Click to reveal..

..but last night I had an idea that is based on TheLiam's Overlay Window project (http://www.opserver.de/ubb7/ubbthreads.php?ubb=showgallery&Number=374348#Post374348).

What I think will work is this: I create two applications, one is the game menu and the other is the game levels. When selecting a new game or selecting the specific level from game menu I don't use level_load but exec to start overlay window (which will be all black). Overlay window will initiate the exe file of the second game-part but, because the overlay window will cover the startup screen of GS, the entire process will look the same as if the level_load was used.

Unfortunately I can't figure out the command that will start the game automatically because the code is in xml:( This is the original (TheLiam's) line of code:

<startbutton name="start" style="button_click" text="Spiel starten" file="Game\main.exe" x="16" y="16" width="75" height="24" backcolor="WhiteSmoke" forecolor="Maroon"/>

I've tried things like:
<open file="Game\main.exe"/>
<start file="Game\main.exe"/>
<startup file="Game\main.exe"/>
<main file="Game\main.exe"/>
..and few others but nothing worked, I was still forced to manually click on the button to start the game:(

Maybe you have some ideas on what to use in order for this to work?


It seems that TheLiam's Overlay Window application doesn't have the feature I was going for. Nevertheless I still think this will workout:) All I need to do is to have a simple 'are you sure/ yes or no' appearing in the window when user click on new game or load game in the menu. Clicking on 'yes' button will start second part of the game and clicking on 'no' will terminate the overly window:)

Last edited by Pavle; 06/18/11 12:12.

>>Demos free3DModels Tutorials<<
>>>>>>> by Pavle Nikolic <<<<<<<

Moderated by  HeelX, Spirit 

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