Here's cl_init. My problem is that RequestNPCSettings doesn't exist on any of the entities I spawn serverside. Is there something wrong here? If I edit this and save it, autorefresh runs and my spawned entities then have the function, but on client connect and entity creation, it's like the function is completely ignored.
Also is there any way to get Draw and Think to work for ai entities?
[lua]ENT.Base = "base_ai"
ENT.Type = "ai"
function ENT:Initialize()
self.Entity.CreationTime = SysTime()
end
function ENT:Draw()
self.Entity:DrawModel()
end
function ENT:Think()
end
function ENT:RequestNPCSettings()
net.Start("_base_npcsettings_req")
net.WriteEntity(self.Entity)
net.SendToServer()
end[/lua]
base_ai's are purely serverside, you can't set up functions for it, I was having the same problem.
Sorry, you need to Log In to post a reply to this thread.