Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by mistery. 12/05/26 12:48
contractUpdate() is filtering if >2 rows
by mistery. 12/04/26 19:03
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (AndrewAMD, mistery), 3,038 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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