What is the base for an anim antity?

hello, i am making an easly editable entity like an snpc, but it isnt. i have tried to make it a shope lady. but i dont know the base you need to put in ENT.Base in the shared file, can anyone share some light?

also, if i put the model to the model of an npc, would it spawn as a ragdoll? if so, how would i set its animation? to idle or something?

[editline]01:00PM[/editline]

this is my code so far:

init:


AddCSLuaFile( "shared.lua" )

include('shared.lua')




function ENT:SpawnFunction(ply, tr)
	if not tr.Hit then return end

		local ent = ents.Create("sent_dt")
		local trace = ply:GetEyeTraceNoCursor();
			ent:SetPos(trace.HitPos + trace.HitNormal * 2);
			ent:SetVar("Owner",ply)
			ent:Spawn()
			ent:Activate()
			return ent
end

function ENT:Initialize()
local Model = ( "models/Humans/Group01/Female_01.mdl" )
	self.Entity:SetModel(Model)
	self.Entity:PhysicsInit(SOLID_VPHYSICS)
	self.Entity:SetMoveType(MOVETYPE_VPHYSICS)
	self.Entity:SetSolid(SOLID_VPHYSICS)
	self.Entity:SetUseType(SIMPLE_USE)

	local phys = self.Entity:GetPhysicsObject()
		if phys:IsValid() then
			phys:Wake()
		end

	self.Position = Vector()
	self.Activated = false
end


 function ENT:OnTakeDamage(dmg)

 end



function ENT:Use( activator, caller )


	if ( activator:IsPlayer() ) then

		activator.ConCommand("test_panel")

	end

end




shared:



ENT.Type = "Anim"
ENT.PrintName		= "Shop Lady"
ENT.Author			= "Meisno"

ENT.Spawnable			= true
ENT.AdminSpawnable		= false


cl_init:


ENT.Spawnable			= true
ENT.AdminSpawnable		= true

include('shared.lua')

function ENT:Initialize()

end

function ENT:Draw()

	self.Entity:DrawModel()

end

function ENT:OnRemove()

end


function showpanel()
	local devpanel = vgui.Create( "DFrame" )
	devpanel:SetPos( 50,50 )
	devpanel:SetSize( 500, 500 )
	devpanel:SetTitle( "Testing Derma Stuff" )
	devpanel:SetVisible( true )
	devpanel:SetDraggable( true )
	devpanel:ShowCloseButton( true )
	devpanel:MakePopup()

	local PropertySheet = vgui.Create( "DPropertySheet", devpanel )
	PropertySheet:SetParent( devpanel )
	PropertySheet:SetPos( 5, 30 )
	PropertySheet:SetSize( 340, 315 )

	local icon = vgui.Create( "DModelPanel", PropertySheet )
	icon:SetModel( LocalPlayer():GetModel() )

	icon:SetSize( 100, 100 )
	icon:SetCamPos( Vector( 0, 0, 0 ) )
	icon:SetLookAt( Vector( 0, 0, 0 ) )
	icon:SetParent( devpanel )
	icon:SetPos( 0, 0 )


	PropertySheet:AddSheet( "Some Menu", SheetItemOne, "gui/silkicons/user", false, false, "YourSelf In An Image!!" )

end


concommand.Add("Test_panel", showpanel)


btw: it said that the author was meisno, thats me

shared.lua
[lua]
ENT.Base = “base_ai”
[/lua]

init.lua
[lua]
function ENT:Initialize()

self:SetModel( "models/Humans/Group03/female_03.mdl" ) 
 
self:SetHullType( HULL_HUMAN ); 
self:SetHullSizeNormal(); 
 
self:SetSolid( SOLID_BBOX )  
self:SetMoveType( MOVETYPE_NONE ) 
 
self:CapabilitiesAdd( CAP_ANIMATEDFACE | CAP_TURN_HEAD ) 
 
self:SetMaxYawSpeed( 5000 ) 
 
self:SetSequence( "idle");

end
[/lua]

whats did you put for shared? i cant see it?

[editline]01:49PM[/editline]

this is the errored part:


function ENT:SpawnFunction(ply, tr)
	if not tr.Hit then return end

		local ent = ents.Create("sent_dt")
		local trace = ply:GetEyeTraceNoCursor();
			**ent:SetPos(trace.HitPos + trace.HitNormal * 2);**
			ent:SetVar("Owner",ply)
			ent:Spawn()
			ent:Activate()
			return ent
end

its on the SetPos part but i cant figure it out :frowning:


entities/sent_shoplady/init.lua:15: Tried to use a NULL entity!

line 15 is the higlighted part

[editline]01:49PM[/editline]

that part is in itit btw

[editline]01:52PM[/editline]

nvm, i fixed that part: this is the error now:



ERROR: Trying to derive entity sent_shoplady from non existant entity nil!
ERROR: Trying to derive entity sent_shoplady from non existant entity nil!
entities/sent_shoplady/init.lua:26: attempt to call method 'SetHullType' (a nil value)


[editline]01:59PM[/editline]

also, i get the error that hull type is a non existing entity or something like that