Maybe write it not in the While Loop, take a If function. Like so:

Code:

function fnct_chc_1
{
me = ent_create (chc_1, vector(0,0,0), null);
player = my;
my.scale_x = 1.0;
my.scale_y = my.scale_x;
my.scale_z = my.scale_x;
var ship_speed;
while (1)
{
if(my.healthpoints>0)
{
if (key_w == on)
{
if (ship_speed.x < 1)
{
ship_speed.x += 10.0 * time;
}
.
.
.
}



cYa Sebastian


Tutorials:
[Blender]Terrain creation ENG/GER
[Blender]Low Poly Tree Modeling
[GIMP]Create a Texture for Terrains
CLICK HERE