Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Nymphodora, AndrewAMD, TipmyPip, Quad, Imhotep), 847 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Stopping levels from running and changing levels #154983
09/18/07 04:05
09/18/07 04:05
Joined: Jul 2006
Posts: 91
Florida, USA
Knuckles Offline OP
Junior Member
Knuckles  Offline OP
Junior Member

Joined: Jul 2006
Posts: 91
Florida, USA
How do I switch between levels effectively? When I want to switch a level, I don't want the previous level to still be running and use up resources. So how do I stop one level from running so the other can run?

Re: Stopping levels from running and changing levels [Re: Knuckles] #154984
09/19/07 12:23
09/19/07 12:23
Joined: Oct 2006
Posts: 873
S
Shadow969 Offline
User
Shadow969  Offline
User
S

Joined: Oct 2006
Posts: 873
previous level will be terminated automatically when you load a new one(level_load)

Re: Stopping levels from running and changing levels [Re: Shadow969] #154985
09/19/07 12:52
09/19/07 12:52
Joined: Jul 2006
Posts: 91
Florida, USA
Knuckles Offline OP
Junior Member
Knuckles  Offline OP
Junior Member

Joined: Jul 2006
Posts: 91
Florida, USA
Even the functions associated with the previous level?

Re: Stopping levels from running and changing levels [Re: Knuckles] #154986
09/19/07 13:29
09/19/07 13:29
Joined: Oct 2006
Posts: 873
S
Shadow969 Offline
User
Shadow969  Offline
User
S

Joined: Oct 2006
Posts: 873
Quote:

The current level will terminated. The engine cache holding level entity files is purged. All current entities in the old level are removed, all entity pointers referring to them cannot be used any longer.
All actions assigned to or functions called by level entities - that means all functions in which the my pointer is not zero - are automatically terminated at their next wait instruction.
The game script itself will keep running and won't change, even if a different script was assigned by WED to the new level.
One frame cycle after this instruction the level is loaded, two frame cycles after the instruction the local entities in the new map are created and their actions are started. Wait two frame cycles (wait(2);) before modifying the level, for instance by creating entities.
When giving a HMP or MDL file name, the new level contains this terrain or model only. When using an empty string (""), an empty level will be loaded.
During the load process, the on_level event can be used to display a progress bar or animation on a panel.
One frame after level loading the last_error variable indicates loading errors.



From the almighty manual

Re: Stopping levels from running and changing levels [Re: Shadow969] #154987
09/20/07 20:58
09/20/07 20:58
Joined: Jul 2006
Posts: 91
Florida, USA
Knuckles Offline OP
Junior Member
Knuckles  Offline OP
Junior Member

Joined: Jul 2006
Posts: 91
Florida, USA
Alright, I do not know what is going on... When I try to change levels, the level loads, but the game freezes. It's zoomed in using the camera that's in the WMB file. Yet, when I call the level from the startup() function, everything works fine. The camera works and everything. I don't see what the difference is. It's not calling any other function but that one.

It is hard to explain what I mean, if this sounds confusing, so I would be more than happy to email the source code to someone who is willing to help me figure it out to show you what I mean. At this point, I am stumped at what the problem could be.

Re: Stopping levels from running and changing levels [Re: Knuckles] #154988
09/21/07 06:37
09/21/07 06:37
Joined: Aug 2006
Posts: 152
vector(200,45,338)
Marwan Offline
Member
Marwan  Offline
Member

Joined: Aug 2006
Posts: 152
vector(200,45,338)
Ok , pm me


age:16 game design and programming experience:2 years

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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