actually, there isnt any level change its just the first level. The code is very simple so i must be missing something very obvious. This is the code i am using:
////////////////////////////////////////////////////////////////////////
// A6 main wdl:
// Created by WED.
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
// The PATH keyword gives directories where template files can be found.
path "C:\\Program Files\\GStudio6\\template_6"; // Path to A6 templates directory
path "C:\\Program Files\\GStudio6\\template_6\\code"; // Path to A6 template code subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\images"; // Path to A6 template image subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\sounds"; // Path to A6 template sound subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\models"; // Path to A6 template model subdirectory
////////////////////////////////////////////////////////////////////////////
// Included files
//include <gid01.wdl>; // global ids
//include <display00.wdl>; // basic display settings
include <newton.wdl>;
include <newtonScript2.wdl>;
include <newtonVehicle.wdl>;
/////////////////////////////////////////////////////////////////
var video_mode = 6; // screen size 640x480
var video_depth = 16; // 16 bit colour D3D mode
var video_screen=1;
/////////////////////////////////////////////////////////////////
// Filename of the starting level.
string level_str = <car.WMB>; // give file names in angular brackets
ifdef USE_NEWTON_GAME_DYNAMICS;
string newtonLevel_cls = <car.CLS>;
endif;
///////////////////////////////////////////////////////////////////
bmap splashmap = <logolite.pcx>; // the default logo in templates
panel splashscreen {
bmap = splashmap;
flags = refresh,d3d;
}
// The following script controls the sky
sky horizon_sky {
// A backdrop texture's horizontal size must be a power of 2;
// the vertical size does not matter
type = <horizon.pcx>;
tilt = -10;
flags = scene,overlay,visible;
layer = 3;
}
// Desc: The main() function is started at game start
function main()
{
tex_share = on; // map entities share their textures
// center the splash screen for non-640x480 resolutions, and display it
splashscreen.pos_x = (screen_size.x - bmap_width(splashmap))/2;
splashscreen.pos_y = (screen_size.y - bmap_height(splashmap))/2;
splashscreen.visible = on;
// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);
// set some common flags and variables
// freeze all entity functions
level_load(level_str);
ifndef USE_NEWTON_GAME_DYNAMICS;
wait(1);
dll_handle = newtonHandle;
NewtonAddMap (level_str, splashscreen);
endif;
freeze_mode = 1;
sleep(1);
splashscreen.visible = off;
bmap_purge(splashmap); // remove splashscreen from video memory
freeze_mode = 0;
}
If you can spot something please let me know because i'm at a loss.
thanks
dragon