Hello, i have a little problem with zombie scenario mod.
The zombies which are entries can`t climbing the stairs and I don`t know how to fix this bug.
Code:
Create_Zombie(id, ZombieClass)
{
new ent = create_entity("info_target")
new Float:Origin[3], Float:health, model[64];
Class[ent] = ZombieClass
health = ArrayGetCell(g_class_health, Class[ent])
if(Class[ent] == 12)
{
collect_spawn_boss(Origin)
}
else
{
collect_spawn(Origin)
}
if(Round == 1)
{
health *= 1.2
}
else if(Round == 2)
{
health *= 1.4
}
else if(Round == 3)
{
health *= 1.8
}
else if(Round == 4)
{
health *= 2.2
}
else if(Round == 5)
{
health *= 2.6
}
else if(Round == 6)
{
health *= 3.0
}
else if(Round == 7)
{
health *= 3.4
}
else if(Round == 8)
{
health *= 3.8
}
else if(Round == 9)
{
health *= 4.0
}
else if(Round == 10)
{
if(Class[ent] == 12)
{
health *= 3.5
}
else
{
health *= 2.6
}
}
ArrayGetString(g_class_model, Class[ent], model, sizeof(model))
entity_set_string(ent, EV_SZ_classname, NPC_CLASSNAME);
if(id)
{
entity_set_origin(ent, Origin);
}
else
{
entity_set_origin(ent, Origin);
}
entity_set_float(ent, EV_FL_takedamage, 1.0);
entity_set_float(ent, EV_FL_friction, 1.0);
entity_set_float(ent, EV_FL_animtime, 2.0);
entity_set_float(ent, EV_FL_framerate, 1.0);
entity_set_float(ent, EV_FL_health, health);
entity_set_float(ent, EV_FL_gravity, 0.8);
entity_set_model(ent, model);
entity_set_int(ent, EV_INT_fixangle, 1);
entity_set_int(ent, EV_INT_movetype, MOVETYPE_STEP);
entity_set_int(ent, EV_INT_solid, SOLID_SLIDEBOX);
entity_set_int(ent, EV_INT_gamestate, 1);
entity_set_byte(ent, EV_BYTE_controller1, 125);
entity_set_byte(ent, EV_BYTE_controller2, 125);
entity_set_byte(ent, EV_BYTE_controller3, 125);
entity_set_byte(ent, EV_BYTE_controller4, 125);
set_task(1.0, "start_attack", ent)
static modelindex
modelindex = ArrayGetCell(g_class_modelindex, Class[ent])
set_pev(ent, pev_modelindex, modelindex)
set_pev(ent, pev_victim, 0)
new Float:VEC_HULL_MIN[3] = { -16.0, -16.0, -40.0 }
new Float:VEC_HULL_MAX[3] = { 16.0, 16.0, 72.0}
entity_set_size(ent, VEC_HULL_MIN, VEC_HULL_MAX)
play_anim(ent, ANIM_IDLE, 1.0)
drop_to_floor(ent)
if(!Register)
{
RegisterHamFromEntity(Ham_TakeDamage, ent, "fw_NPC_Zombie_TakeDamage");
RegisterHamFromEntity(Ham_Killed, ent, "fw_NPC_Zombie_Killed");
Register = true
}
Zombie_Think[ent] = 1
Zombie[ent] = 1
static g_fwDummyResult
ExecuteForward(fw_npc_Create, g_fwDummyResult, ent)
return 1;
}