this works pretty well for me:

Code:

function main()
{
	load_level("asd.wmb");  // LOADING THE FILE
	clip_size = 0; // show all the triangles for all the models
	clip_particles = 1;
	fps_max = 80;   // FPS THINGY
	fps_min = 80;        
	on_d == null;
}
 
ENTITY* ENEMY; // DEFINE^!!!!
 
var heart = 100; // PLAYERS HEALTH;
 
var PLAYER_SPEED[3]; // This weird Vector used to walk;
 
function DEAD(); // YOU SEE I ADD THIS
 
function DEAD2(); // I AM NOT STUPID! I DEFINED THIS TO OBUT FORGOT TO SAY!
 
PANEL SHIT
{
	pos_x = 0; // UPPER LEFT;
	pos_Y = 50;
	flags = refresh,overlay,d3d; // NOT VISIBLE!!!
	digits(0,0,"%s",*,1,"HAHA");
}
 
action player12345()   // THE PLAYER's ACTION!
{
	player = me;				// I AM THE FOOLISH PLAYER;
 
	my.ENABLE_ENTITY = on;  // I THINK THIS MUST BE CLEAR
 
	my.POLYGON = on; // OK I SET POLYGON ON ONLY IN SCRIPT!!!!
 
	my.event = DEAD;        // His shit Event :)
 
	while(heart >= 0)
	{
		PLAYER_SPEED.x =15 * (key_w - key_s) * time;// THIS MUST BE CLEAR TOO I THINK
 
		PLAYER_SPEED.y =15 * (key_a - key_d) * time;// AS I LEARNED IT FROM THE TUTORIALS WITHOUT += or -=!
 
		camera.x +=15 * (key_w - key_s) * time; // FOR THE CAMERA TOO!!!!
 
		camera.y +=15 * (key_a - key_d) * time;
 
		c_move(me,PLAYER_SPEED,NULLVECTOR,IGNORE_PASSABLE | GLIDE);   // THE MAIN THINGY TO WALK! CLEAR TOO!

		wait(1);  // NO ENDLESS LOOP
	}
}
 
action ENEMYHATER // ENEMY's ACTION
{
	ENEMY = me; 	
 	my.ENABLE_IMPAC = on;
 	my.event = DEAD2;
 	my.POLYGON = ON; ///////////
}
 
function DEAD()
{
	SHIT.visible = on;
}
 
 
function DEAD2()
{
	ent_remove(me); // I THINK THIS SHOULD BE CLEAR TOO!!!
						// IMAO A BUG!!! HELP! IF I TOUCH THE ENEMY, THEN HE DONT VANISHES! WHY?
}


and about the enemy part: READ THE MANUAL:

Quote:

If two entities collide, each one's event function can be triggered, the moving entities' one with EVENT_ENTITY, the hit entities' one with either EVENT_IMPACT or EVENT_PUSH. If both entities were moving, each one can get two different events in undefined order.


means, only moveing entities EVENT_ENTITY gets triggered, other one(enemy in this case) needs either EVENT_PUSH or EVENT_IMPACT.


next time BEFORE blaming engine, READ MANUAL, ASK in forum if it's your faulty code or bug.

Last edited by Quadraxas; 12/25/08 17:53.

3333333333