• Increasing Zombie Detection Range
    0 replies, posted
[CODE]//ZOMBIES THINK function GM:Think() for _, ply in pairs (player.GetAll()) do local plypos = ply:GetPos() local Zombies = ents.FindByClass("npc_zombie") for _, ZombieMind in pairs( Zombies ) do if ZombieMind:IsCurrentSchedule ( SCHED_IDLE_STAND ) or ZombieMind:IsCurrentSchedule ( SCHED_COMBAT_STAND ) or ZombieMind:IsCurrentSchedule ( SCHED_ALERT_STAND ) then if (plypos:Distance(ZombieMind:GetPos()) < 100000) then ZombieMind:SetEnemy( ply ) ZombieMind:SetLastPosition( plypos ) ZombieMind:UpdateEnemyMemory( ply, plypos ) ZombieMind:SetSchedule( SCHED_CHASE_ENEMY ) ZombieMind:NavSetGoalTarget( ply, plypos ) ZombieMind:Activate() end end end end end[/CODE] I am trying to increase the zombie detection range but it doesn't look like it is working. Without creating a new zombie is there a way to increase it? If I do have to create a new zombie, is there a way I can copy the default HL2 zombie and modify it? Thanks for any help! :)
Sorry, you need to Log In to post a reply to this thread.