From f1e99d19a5aa6e5fa61518366235e3da09689d0b Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 2 Jan 2016 22:10:06 -0500 Subject: Ai overhual now working --- gamemode/npcsystem/npcs/base.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'gamemode/npcsystem/npcs/base.lua') diff --git a/gamemode/npcsystem/npcs/base.lua b/gamemode/npcsystem/npcs/base.lua index 7afb4fe..670c476 100644 --- a/gamemode/npcsystem/npcs/base.lua +++ b/gamemode/npcsystem/npcs/base.lua @@ -6,14 +6,24 @@ NPC.Icon = Material("wintersurvival2/hud/ws1_icons/icon_rock") NPC.Social = "Pack" --Solo, Pack -NPC.Vitality = 0 -NPC.Speed = 0 +NPC.Stats = { + ["Vitality"] = 100, + ["Speed"] = 50, + ["AwareDist"] = 1000, +} + +--Some npc's like birds have diffent names for their idle sequence +NPC.IdleSequence = "Idle" + --Drops should be formated as [index]={["item name"], percent_drop} where percent_drop is a number from 0 to 100 NPC.Drops = nil --Attacks should be formated as [i]={function attackpriority() = function doattack()} NPC.Attacks = nil +--Attack priority should be formated as [i] = func tion(return int priority) attackpriority +NPC.AttackPriority = nil + --A function that takes a position and returns true if this is an acceptable place to spawn NPC.SpawnLocations = nil -- cgit v1.2.3-70-g09d2