aboutsummaryrefslogtreecommitdiff
path: root/gamemode/npcsystem/sh_movingnpc.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2018-11-03 18:23:45 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2018-11-03 18:23:45 -0400
commit28affa22541b9ef251707793f6b1c1a26d663592 (patch)
tree622754894d75c74dc5e8516ccf184ad4bf328fef /gamemode/npcsystem/sh_movingnpc.lua
parentc639e7c7c6ab1595fdce39f56312e3d6a886bbe8 (diff)
downloadartery-28affa22541b9ef251707793f6b1c1a26d663592.tar.gz
artery-28affa22541b9ef251707793f6b1c1a26d663592.tar.bz2
artery-28affa22541b9ef251707793f6b1c1a26d663592.zip
Started on new npc system
Started work on the new npc system
Diffstat (limited to 'gamemode/npcsystem/sh_movingnpc.lua')
-rw-r--r--gamemode/npcsystem/sh_movingnpc.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/gamemode/npcsystem/sh_movingnpc.lua b/gamemode/npcsystem/sh_movingnpc.lua
new file mode 100644
index 0000000..21f302e
--- /dev/null
+++ b/gamemode/npcsystem/sh_movingnpc.lua
@@ -0,0 +1,22 @@
+local reg = nrequire("sh_npcsystem.lua")
+
+local base = nrequire("sh_basenpc.lua")
+local nextbot = scripted_ents.Get("base_nextbot")
+local npc = {}
+
+npc.Name = "Walkable NPC Base"
+
+setmetatable(npc,{__index = function(self,key)
+ return self[key] or base[key] or nextbot[key]
+end})
+
+function npc:Initalize()
+ if base.Initalize then base.Initalize(self) end
+ if nextbot.Initalize then nextbot.Initalize(self) end
+ print("After initalizeing walkable, self.loco is", self.loco)
+end
+
+function npc:Face(ang_or_vec)
+ print("trying to face:",ang_or_vec,type(ang_or_vec))
+end
+reg.RegisterNPC(npc)