Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, Aku_Aku, 1 invisible), 579 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
level_load problems....... #22282
01/17/04 16:50
01/17/04 16:50
Joined: Apr 2002
Posts: 1,867
N
Neuro Offline OP
Serious User
Neuro  Offline OP
Serious User
N

Joined: Apr 2002
Posts: 1,867
Heya folks. I been playing around with level_load and I notice that any code written under level_load is not executed. Where does the code execute from after the level is loaded and is there any way around this?


The Wii Effect - a look at Nintendo's epidemic
Re: level_load problems....... [Re: Neuro] #22283
01/17/04 19:10
01/17/04 19:10
Joined: Aug 2003
Posts: 89
Hamburg, Germany
JHunke Offline
Junior Member
JHunke  Offline
Junior Member

Joined: Aug 2003
Posts: 89
Hamburg, Germany
Neuro,

I have linked ten Levels now in my Game and all Actions work fine.

There is a Levelchange Code in AUM 28 including Weapon restore. You can include the Script into your main script and use it as a barebone.

Some Tips:

When designing your levels make sure they also have all Scripts included in their individual Script, including the Levelchange.wdl. Otherwise you are not able to assign Actions and test the Levelchange. Well at least I do it that way.

I use an invisible big sprite to attach the Levelchange action to it. When the Player collides with this Sprite Levelchange is executed.

Change the Scene map or Sky for the next Level before level_change. Otherwise you may see the map Scene flipped in the new Level right in the beginning. Doesnt look good.

Hope that helps...

JH


For Sprite and Skinanimation tools feel free to visit www.stadtparkentertainment.de
Re: level_load problems....... [Re: Neuro] #22284
01/18/04 01:55
01/18/04 01:55
Joined: Oct 2003
Posts: 1,258
Virginia, USA
qwerty823 Offline
Senior Developer
qwerty823  Offline
Senior Developer

Joined: Oct 2003
Posts: 1,258
Virginia, USA
I bet your code is something like this:

Code:


...
level_load(my_next_level);
wait(2); // Wait for level to load.
// Do some commands here.
...

Code:


And this code is either part of an event handler (my.event) or an entity action.
In either case, when you do a level load, all entities are destroyed and their actions stopped as soon as they hit their next wait instruction. For this it will be "right" after the level load.

What I ended up doing was making a seperate script that handled level loading, and just used a global variable to control the level to load. Im sure there are more then one way to do it, but this way worked for me.


Never argue with an idiot. They drag you down to their level then beat you with experience
Re: level_load problems....... [Re: qwerty823] #22285
01/18/04 04:14
01/18/04 04:14
Joined: Apr 2002
Posts: 1,867
N
Neuro Offline OP
Serious User
Neuro  Offline OP
Serious User
N

Joined: Apr 2002
Posts: 1,867
Hey Qwerty,

Thats exactly what its doing....yah I figured out a way to work around it with globals. Thanks though!


The Wii Effect - a look at Nintendo's epidemic

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