I’ve been a little iffy with think hooks, I’ve been kinda OCD-ish about it causing lag because it is called so often. I put self:BodyUpdate() and what not in Think, and it works. Thanks! Well, is it okay to call those randomly in Think? Will it cause lag? I’ll probably get boxes for asking that, but I feel a little worried about lag.
if self.lastthink < CurTime() then
if ( self:GetEnemy() and IsValid( self:GetEnemy() ) ) then
if (self:GetRangeTo(self:GetEnemy()) < 30) then
if self:GetEnemy():IsPlayer() then
self:GetEnemy():TakeDamage( 10 )
self:GetEnemy():ViewPunch(Angle( 10, 0, 0 ))
self.lastthink = CurTime() + 1 -- Where 1 is the delay