Hallo Leute
mein Problem heute ist, dass my.event nicht ausgelöst wird.
Habe unten mal den Code gepostet. Kann einfach keinen fehler finden und die Engine haut mir auch keinen raus.
Danke im voraus für eure hilfe
Code:
#define zombie_health skill[10]
var lvl = 1;
var score = 0;
var money = 20;
var survivor = 10;
function event_sht()
{
if (event_type == EVENT_IMPACT)
{
my.zombie_health -= 1;
if(my.zombie_health == 0)
{
money +=5;
score += lvl*10;
wait(1);
}
wait(1);
}
if (event_type == EVENT_ENTITY)
{
survivor -= 1;
my.zombie_health -= my.zombie_health;
wait(1);
}
if ((event_type == EVENT_CLICK) | (event_type == ENABLE_TOUCH))
{
survivor -= 1;
my.zombie_health -= my.zombie_health;
wait(1);
}
}
function enemy_test2()
{
ent1 = my;
my.zombie_health = 14 *lvl;
my.flags |= (ENABLE_ENTITY | ENABLE_CLICK | ENABLE_TOUCH | ENABLE_IMPACT | ENABLE_BLOCK );
my.event = event_sht();
}