oldyz
Well-known member
Bloodbane
i have made this character as the "base" -
as far as i can tell, the speed changes, the ai seems to match, but the thing that does not change is the health - it seems all versions keep the health the same - do i have to change the health with script before it loads the weapon model?
or is there a missing parameter that i have to change in order for the "weapon model" to keep its own health?
i have made this character as the "base" -
Code:
name zombieL-M
health 50
nolife 1
type enemy
#lifespan 3
shadow 3
gfxshadow 1
noquake 1
falldie 1
nodieblink 3
animationscript data/scripts/zombie.c
weapons zombiel zombiel-3 zombiel-6 zombiel-8 zombiel-10 zombiel-14 zombieL-M
weaploss 3
modelflag 3
palette data/chars/zombie/00a
alternatepal data/chars/zombie/alt1a
alternatepal data/chars/zombie/alt2a
alternatepal data/chars/zombie/alt3a
alternatepal data/chars/zombie/alt4a
alternatepal data/chars/zombie/alt2a
load zombiel
load zombiel-3
load zombiel-6
load zombiel-8
load zombiel-10
load zombiel-14
anim spawn
delay 1
offset 124 124
bbox 0 0 0 0
@script
if(frame == 0){
void self = getlocalvar("self");
int map = rand()%5;
if(map < 0)
{
-map == map;
}
changeentityproperty(self, "map", map);
}
@end_script
frame data/chars/zombie/01
@script
void self = getlocalvar("self");
if( frame == 0){
int r = rand()%45;
if( r > 30){
changeentityproperty(self, "animpos", 3);
} else if( r < -29){
changeentityproperty(self, "animpos", 5);
} else if( r > 14){
changeentityproperty(self, "animpos", 1);
} else if( r < -14){
changeentityproperty(self, "animpos", 7);
} else if( r < 0){
changeentityproperty(self, "animpos", 9);
} else if( r > 0){
changeentityproperty(self, "animpos", 11);
}
}
@end_script
@script
void self = getlocalvar("self");
if(frame == 2){
changeentityproperty(self, "aiflag", "attacking", 1);
changeentityproperty(self, "aiflag", "idling", 0);
changeentityproperty(self, "takeaction", "common_attack_proc");
changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW1"));
}
@end_script
frame data/chars/zombie/01
frame data/chars/zombie/01
@script
void self = getlocalvar("self");
if(frame == 4){
changeentityproperty(self, "aiflag", "attacking", 1);
changeentityproperty(self, "aiflag", "idling", 0);
changeentityproperty(self, "takeaction", "common_attack_proc");
changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW2"));
}
@end_script
frame data/chars/zombie/01
frame data/chars/zombie/01
@script
void self = getlocalvar("self");
if(frame == 6){
changeentityproperty(self, "aiflag", "attacking", 1);
changeentityproperty(self, "aiflag", "idling", 0);
changeentityproperty(self, "takeaction", "common_attack_proc");
changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW3"));
}
@end_script
frame data/chars/zombie/01
frame data/chars/zombie/01
@script
void self = getlocalvar("self");
if(frame == 8){
changeentityproperty(self, "aiflag", "attacking", 1);
changeentityproperty(self, "aiflag", "idling", 0);
changeentityproperty(self, "takeaction", "common_attack_proc");
changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW4"));
}
@end_script
frame data/chars/zombie/01
frame data/chars/zombie/01
@script
void self = getlocalvar("self");
if(frame == 10){
changeentityproperty(self, "aiflag", "attacking", 1);
changeentityproperty(self, "aiflag", "idling", 0);
changeentityproperty(self, "takeaction", "common_attack_proc");
changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW5"));
}
@end_script
frame data/chars/zombie/01
frame data/chars/zombie/01
@script
void self = getlocalvar("self");
if(frame == 12){
changeentityproperty(self, "aiflag", "attacking", 1);
changeentityproperty(self, "aiflag", "idling", 0);
changeentityproperty(self, "takeaction", "common_attack_proc");
changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW6"));
}
@end_script
frame data/chars/zombie/01
frame data/chars/zombie/01
anim follow1
delay 1
offset 124 124
bbox 0 0 0 0
weaponframe 0 1
frame data/chars/zombie/01
anim follow2
delay 1
offset 124 124
bbox 0 0 0 0
weaponframe 0 2
frame data/chars/zombie/01
anim follow3
delay 1
offset 124 124
bbox 0 0 0 0
weaponframe 0 3
frame data/chars/zombie/01
anim follow4
delay 1
offset 124 124
bbox 0 0 0 0
weaponframe 0 4
frame data/chars/zombie/01
anim follow5
delay 1
offset 124 124
bbox 0 0 0 0
weaponframe 0 5
frame data/chars/zombie/01
anim follow6
delay 1
offset 124 124
bbox 0 0 0 0
weaponframe 0 6
frame data/chars/zombie/01
as far as i can tell, the speed changes, the ai seems to match, but the thing that does not change is the health - it seems all versions keep the health the same - do i have to change the health with script before it loads the weapon model?
or is there a missing parameter that i have to change in order for the "weapon model" to keep its own health?