Hi
I have a little problem:
I have an entity which can be be killed by the player and i want only one of this entity in my level, but when it's killed it should appear randomized in an other part of the level.so simply the entity should disappear when you hit it and then it should appear on an other position in the level.
i also wrote a little code for this but it doesn't work....
var anz = 1; //to check that theres only one entity
action entity
{
...
// after hitting the entity
anz = 0;
ent_remove(me);
}
var x;
var y;
var z;
function entity_creating()
{
while (!player)
{
if (anz < 1)
{
x = int(random(580) -290);
y = int(random(424) -212);
z = 32;
vec_set (temp,vector(x,y,z));
ent_create (gem_mdl,temp,entity);
}
wait(1);
}
}
Could someone please help me?