This is how to load map and apply collision to it :


Code:
#include <alphabox_engine.h>


ENTITY* exemple_map = ent_create("map.x",&vector(0,0,0),NULL);

int main()
{
	set(exemple_map,COLLIDE); /// now your player will have a collision with the map.
	
	while(1)
	{
		
		wait(1);
	}
}




to create any light just use this :

Code:
LIGHT* new_light = create_light(1);/// 0 : directional light , 1: point light , 2 : spot light




to load and play music
Code:
int music_id = media_play("your media or sound (all types)" ,volume,flags);
//flags :
//LOOP : to make music or sound loop

media_pause(music_id); /// pause music or sound

media_resume(music_id); /// resume music or sound

media_stop(music_id); /// stop music or sound

set_mediavolume(music_id,85); /// set music or sound volume

get_medialen(music_id); /// Get len of music or sound

set_media_pos(music_id,50); /// Set reader position

int media_pos = get_media_pos(music_id); /// Get reader position

set_media_limit(music_id,20,100); /// set a limits for music or sounds

set_media_3d(music_id,vector(50,20,100)); /// set media 3d

///with this function you can create easly a media player :)





Some demos to show how to load maps and apply collision: http://www.mediafire.com/file/2ahb3ak2s9xre5d/demos.rar


Have a fun guys

Last edited by Dico; 11/16/16 11:08.