• Models Not Colliding Properly.
    3 replies, posted
So I was making a cool little shield weapon that spawns a big 'ol entity to stop bullets and so forth from hitting you. Here is the code for the entity: [CODE]---- Health dispenser if SERVER then AddCSLuaFile("shared.lua") end if CLIENT then -- this entity can be DNA-sampled so we need some display info ENT.PrintName = "Bubble" local GetPTranslation = LANG.GetParamTranslation end ENT.Type = "anim" ENT.Model = Model("models/props_manor/observatory.mdl") ENT.CanHavePrints = true ENT.CanUseKey = true AccessorFunc(ENT, "Placer", "Placer") function ENT:Initialize() if SERVER then self.Entity:SetModel( self.Model ) self:SetCollisionGroup(COLLISION_GROUP_WEAPON) self:SetSolid(SOLID_VPHYSICS) self:PhysicsInit(SOLID_VPHYSICS) self:SetMoveType(MOVETYPE_NONE) self:SetRenderMode(RENDERMODE_TRANSCOLOR) --self:SetColor(Color(0,0,0,0)) self:SetColor(Color(255,255,255,255)) self:DrawShadow(false) timer.Simple(19,function() if IsValid(self) then self:Remove() end end) end end -- traditional equipment destruction effects [/CODE] Sorry for the messy fuck-bucket I like to call code. Now here is the problem. This blocks bullets fine in single player, but for some reason or another, when uploaded to my server, the model only sometimes stops bullets. I could fire a whole clip into it and it could stop every one, then the next 10000 don't get blocked. It might have something to do with the tickrate, but if you guys see the error, that would be much appreciated.
Just block bullet damage in playerscaledamage hook and make the visible shield no collided, etc
[QUOTE=Robotboy655;43005550]Just block bullet damage in playerscaledamage hook and make the visible shield no collided, etc[/QUOTE] But then they still get hit and blood comes out and it looks hacky as fook. I like it blocking the bullets and sparking and would really like to not have to resort to that kinda thing.
I just realized that tf2 content was not mounted properly onto the server, this explains it. I really feel quite idiotic now. Then again it was removed without my knowledge....
Sorry, you need to Log In to post a reply to this thread.