Code:
unction main()
{
	vec_set(screen_size,vector(800,400,0));
	vec_set(screen_color,vector(50,1,1)); // dark blue
	vec_set(sky_color,vector(50,1,1)); // dark blue
	video_window(NULL,NULL,0,"My New Game");
	d3d_antialias = 1;
	shadow_stencil = 3;
	/////////////////////////////
	// Video section 
	var vid_handle=0;  // create a local var to hold the media handle
	vid_handle=media_play("testvid.wmv",NULL, 75); //play media and set var
	// loop only while var is valid 
	while(vid_handle)
	{
		if(key_any) // check if any key was pressed
		media_stop(vid_handle); // stop vid
		wait(1); // required wait avoids endless looping
	}
	///////////////////////////////////
	
	//camera.ambient = 100;
	camera.arc = 90; // set camera.arc to a proper value for shooter games
	fps_max = 75; // limit the frame rate to 75 fps (not really needed)
	video_screen = 1; // start the game in full screen mode
	video_mode = 8; // run at a 1024x768 pixels resolution on monitors with a 4/3 aspect ratio
	level_load ("shooter.wmb");
        vec_set(camera.x,vector(-250,0,50)); //back X250 up z50
        vec_set(camera.pan,vector(0,-15,0)); // TILTed down 15*
	wait (3); 
	media_loop("action.mp3", NULL, 70); // start the soundtrack
}



try that and see if you can see the level.

Normally if you have a game the camera is attached to the player. So if you like you can move to creating a simple walking player then attaching a camera becomes a integrated part of player code and player creation.

Quote:

function cam_era()
{
// for fps game
while(1)
{
vec_set(camera.x,my.x);// MY is the player ent
vec_set(camera.pan,my.pan) // Look where the player looks
wait(1);
}
}

action ent_player()
{
cam_era();
while(1)
{
my.skill1 = ((key_w-key_s)*10)*time_step; // give a movement value
my.pan-=((key_a-key_d)*10)*time_step; // give turning
c_move(my,my.skill1,nullvector,GLIDE); // move using skill1-skill3 as a vector of speed.
wait(1);
}
}

Last edited by Malice; 06/07/15 11:34.