Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Dico), 16,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Problem with level load #389250
12/12/11 03:17
12/12/11 03:17
Joined: May 2010
Posts: 23
M
Mandeville Offline OP
Newbie
Mandeville  Offline OP
Newbie
M

Joined: May 2010
Posts: 23
Hi. I made a door in the level I working on to reach the next level. There is the code for the door

Code:
action doormatic()
	{

	my.emask |= ENABLE_IMPACT; 	
	
	my.event = load_lev_2;



}


Easy? No 'cause the function ''load_lev_2'' will crash (e1523)
and I dont know why. Except the message window, my player model keep walking for nothing when the level 2 is loaded.

Code:
function load_lev_2()


{


	level_load("1stfloor.wmb");

		
	wait(1);

}



Can you help me please?

Re: Problem with level load [Re: Mandeville] #389252
12/12/11 03:33
12/12/11 03:33
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
An event should only contain very basic commands, try to structure your code as follows:

function load_lev_2()
{
if(you == player) my.skill1 = 0;
}

action doormatic()
{
my.emask |= ENABLE_IMPACT;
my.event = load_lev_2;
my.skill1 = 1;
while(my.skill1) wait(1);
level_load("1stfloor.wmb");
}


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Problem with level load [Re: Superku] #389253
12/12/11 03:46
12/12/11 03:46
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Im not much good with levels, but you could try this...
Code:
function load_lev_2()
{
   my.emask = NULL; 
   wait(1);
   level_load("1stfloor.wmb");
   wait(1);
}


That should 'isolate' it from the actual event and make it safe to use...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Problem with level load [Re: EvilSOB] #389254
12/12/11 03:56
12/12/11 03:56
Joined: May 2010
Posts: 23
M
Mandeville Offline OP
Newbie
Mandeville  Offline OP
Newbie
M

Joined: May 2010
Posts: 23
Thx, it worked. Maybe you re better with level that you think.


Gamestudio download | 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