This one gives me a Crash in sys (system)
Code:
ENTITY* rock;
var base_perc;
var scan_base = 1;
var b = 0;
function rocket_weg()
{
	ent_remove(rock);
	vec_set(camera.x,nullvector);
	scan_base = 1;
	b = 0;
}
function rocket_launch()
{
	rock = ent_create("sphere.mdl",camera.x,NULL);
	set(rock, INVISIBLE);
	rock.emask |= (ENABLE_BLOCK | ENABLE_ENTITY);
	rock.event = rocket_weg;
	while(rock)
	{
		vec_set(camera.x,rock.x);
		c_move(rock,nullvector,vector(10*time_step,(key_a - key_d),(key_w - key_a)), GLIDE);
		wait(1);
	}
}
action rocket_base()
{
	while(me && scan_base == 1)
	{
		c_scan(my.x,my.pan, vector(360,180,15), IGNORE_ME);
		if(you == ball)
		{
			if(key_e)
			{
				scan_base = 0;
				ent_animate(me,"zu",base_perc,0);
				base_perc += 5*time_step;
			}
			if(mouse_right && b == 0)
			{
				b = 1;
				rocket_launch();
			}
			control = 0;
			phent_enable(ball,0);
			ent_animate(me,"zu",base_perc,0);
			base_perc += 5*time_step;
			c_setminmax(me);
		}
		else
		{
			phent_enable(ball,1);
		}
		wait(1);
	}
}



Why? Because after I am clicking okay in the error box everything works fine wink

And can you say me btw waht causes these crashes in sys?

Thanks


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011