Hallo
Ich hätte noch einen WDL Code zu bieten der aber leider nur in Lite C umgeändert werden sollte damit er brauchbar wird. Für A7/8
Leider kann ich den Code nicht selber umändern. Zur belohnung kann den Code jeder benutzen der ihn brauchen kann.
P.S. Ich habe noch einige gute Codes in WDL die brauchbar wären für den einen oder anderen .
MFG.
Code :
//
/////////////////////////////////////////////////
#define zom_wait,99;
#define zom_attack,98;
#define zom_approach,97;
#define zom_die0,96;
#define body,skill30;
#define zom,0;
#define flesh,1;
#define metal,2;
#define _verts,skill36;
SOUND Zombie_spotted,<Dämon.WAV>;
SOUND Zombie_attack,<Dämon2.WAV>;
var p;
var p2;
function zom_wait();
function zom_approach();
function zom_attack();
function zom_init()
{
my.enable_shoot = on; //// zombie schiesst
my.enable_scan = on;
my.enable_detect = on;
}
function zom_event()
{
if(event_type == event_shoot && indicator == _GUNFIRE)
{
my._health -= 5;
}
if(my._health <= 0) { zom_die(); }
}
function zom_die()
{
my._state = zom_wait;
my._animdist = 0;
my.event = null;
my.enable_shoot = off;
my.enable_scan = off;
my.transparent = on;
my.bright = on;
my.alpha = 100;
while(my._animdist <= 100)
{
ent_frame("death",my._animdist);
my._animdist += 7 * time;
wait(1);
}
my.passable = on;
wait(20);
while(my.alpha > 0)
{
my.alpha -= time * 5;
my.z -= time * 0.5;
wait(1);
}
ent_remove(my);
}
action Zombie
{
wait(1);
zom_init();
my.skill30 = 100; //vertex # at wrist
my.skill31 = 176; //vertex # at finger
my._verts = 177; //# of verts in the model
my._health = 100; //starting health
my.event = zom_event;
my._state = zom_wait;
zom_wait();
}
function zom_wait()
{
my._state = zom_wait;
my._animdist = 0;
while(my._state == zom_wait)
{
if(my._health <= 0) { zom_die(); return;}
ent_cycle("stand",my._animdist);
my._animdist += 5 * time;
if(my._animdist >= 100) { my._animdist -= 100; }
force = 0;
actor_move();
if(vec_dist(player.x,my.x) <= 1000) {
zom_approach();}
wait(1);
}
}
function zom_approach()
{
my._state = zom_approach;
my._animdist = 0;
while(my._state == zom_approach && vec_dist(player.x,my.x) > 45)
{
if(my._health <= 0) { zom_die(); return;}
ent_cycle("run",my._animdist);
PLAY_ENTSOUND(ME,Zombie_spotted,50);
my._animdist += 5 * time;
if(my._animdist >= 100) { my._animdist -= 100; }
temp.x = player.x - my.x;
temp.y = player.y - my.y;
temp.z = player.z - my.z;
vec_to_angle(my_angle,temp);
force = 5;
actor_turn();
force = 3;
actor_move();
wait(1);
}
zom_attack();
}
function zom_attack()
{
my._state = zom_attack;
my._animdist = 0;
while(my._state == zom_attack && vec_dist(player.x,my.x) < 50)
{
my._animdist = 0;
while(my._animdist <= 100)
{
if(my._health <= 0) { zom_die(); return;}
ent_frame("attack",my._animdist);
my._animdist += 15 * time;
//
ent_vertex(p,my.skill30);
ent_vertex(p2,my.skill31);
trace_mode = IGNORE_ME + IGNORE_PASSABLE + ACTIVATE_SHOOT;
trace(p2,p);
if(YOU != NULL)
{
PLAY_ENTSOUND(ME,Zombie_attack,50);
your._health -= 1;
}
//
wait(1);
}
my._animdist = 0;
while(my._animdist <= 100)
{
if(my._health <= 0) { zom_die(); return;}
ent_frame("recoil",my._animdist);
my._animdist += 20 * time;
//
ent_vertex(p,my.skill30);
ent_vertex(p2,my.skill31);
trace_mode = IGNORE_ME + IGNORE_PASSABLE + ACTIVATE_SHOOT;
trace(p2,p);
if(YOU != NULL)
{
your._health -= 100;
}
//
wait(1);
}
wait(1);
}
zom_approach();
}
/////////////////////////////////////////////////
[spoiler][/spoiler]
Last edited by Det; 02/15/13 00:37.