Hi
I have another 2 problems...
the first problem is that my enemy entitys don't move over the screen and the second problem is the collision with the player. nothing happens when i touch with my player an enemy. But when there are 30 enemys in the script (because they become more and more during the game) suddenly my player disappears like he should do after a collision with an enemy.
my code (mostly taken from the book of tobias runde; i know it's not up to date but nevertheless it helps sometimes
):
define speed, skill1;
define direction, skill2;
var distance[3];
action enemy
{
my.push = -1;
my.z = 32;
my.passable = on;
If (my.speed == 0)
{
my.speed = random(6)+3;
}
my.direction = 1;
my.pan += random(my.richtung)*time*my.direction;
distance.x = time*my.speed;
distance.y = 0;
distance.z = 0;
vec_set(temp,my.x);
if (vec_dist(my.x, player.x) < 35)
{
ent_remove(player);
}
}
action player
{
player = me;
my.enable_impact = on;
wait(1);
while(player != NULL)
{
my.push = -1;
...
}
}