Hallo,
ich habe ne frage also:
ich will folgenden Code benutzen :
Code:
function wizard
{
clip_size = 0;
while (1)
{
while (my.skill10 < 95)
{
ent_cycle ("attack", my.skill10); // play the attack animation frames
my.skill10 += 3 * time;
wait (1);
}
eball_pos.x = my.x;
eball_pos.y = my.y;
eball_pos.z = my.z + 25; // the energy ball appears betwen wizard's hands
ent_create (energyball_mdl, eball_pos, energy_ball);
snd_play (energy_snd, 70, 0);
waitt (16);
while (my.skill10 > 2)
{
ent_cycle ("attack", my.skill10); // play the attack animation frames
my.skill10 -= 2 * time;
wait (1);
}
waitt (32);
}
}
function energy_ball()
{
wait (1);
my.enable_entity = on;
my.enable_block = on;
my.event = remove_eball;
my.pan = you.pan;
my.tilt = you.tilt;
my.lightred = 250;
my.lightgreen = 150;
my.lightrange = 200;
eball_speed.x = 20;
eball_speed.y = 0;
eball_speed.z = 0;
eball_speed *= time;
while (my != null)
{
my.roll += 20 * time;
move_mode = ignore_you + ignore_passents;
ent_move (eball_speed, nullvector);
wait (1);
}
}
function remove_eball()
{
wait (1);
if (you == player)
{
health -= 25; // decrease player's health
}
ent_remove (me);
}
mein Problem ist nun das wenn ich die function wizard nun auf eine taste speichere er mir natürlich sagt emty pointer my.skill etc wie kann ich es realiesieren das ich nen ordentlichen e-ball bekomme ohne daraus eine action zu machen (mein player hat schon eine und wenn ich sie dabei packe macht der komischen blödsinn ^^)
wäre net wenn ihr antworten hättet
mfg craik