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 (TipmyPip), 18,633 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
Level change problems #344987
10/22/10 14:17
10/22/10 14:17
Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
Roxas Offline OP
Member
Roxas  Offline OP
Member

Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
Hey guys,

I wondered if you might know what the cause of random loading errors
could be.

for instance when i change my level, like going inside a house everything
works just fine. But after a few times i got loading errors that some of my models, which are placed on the other map, could not be loaded or that the sprites I'm using on that map got a bad file format.

I hope you can come up with a solution whats wrong with my level change code or with my maps. I compiled everything and for the code it looks like this:

Code:
function lvl_change()
{
	var telx = 0;
	var tely = 0;
	var telz = 0;
	var charpan = 0;
	var place = 0;
	var telmap = 0;
	
	if(event_type == EVENT_IMPACT)
	{
		game_state = freeze;
	
		telx = my.x_pos;
		tely = my.y_pos;
		telz = my.z_pos;
		charpan = my.char_pan;
		place = my.environment;
		telmap = my.next_map;
		get_map(telmap);
	
		if(current_map == farm){save_field();}
			
		my.emask |= ~ENABLE_IMPACT;
		me = NULL;
		
                // fading the screen
		while(black.alpha < 100){black.alpha += 30 * time_step; wait(1);}
		
		// cleans up variables
		cleanup();
	
		level_load(loadmap);
		
		if(character != NULL)
		{
			character = ent_create("jadenbones.mdl",vector(telx,tely,telz),player_act);
			character.pan = charpan;	
		}
		
		current_map = telmap;		
		
		if(place == outdoor){game_state = outdoor;}else if(place == indoor){game_state = indoor;}
                
                // load related settings and calculate ingame time
		map_settings();
		game_time();
		
                // fade in
		while(black.alpha > 0){black.alpha -= 30 * time_step; wait(1);}
	}
}

action lvl_changer()
{

	set(my, INVISIBLE);
	my.emask |= ENABLE_IMPACT;
	my.event = lvl_change;
}



hope you can help me!

thanks in advance as always

Cheers
Roxas

Re: Level change problems [Re: Roxas] #346552
11/07/10 01:36
11/07/10 01:36
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline
Serious User
pegamode  Offline
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Maybe the problems come from the wrong try to remove the ENABLE_IMPACT:

my.emask |= ~ENABLE_IMPACT;

This should be

my.emask &= ~ENABLE_IMPACT;

Regards,
Pegamode.


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

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