• How to create Point Entity?
    1 replies, posted
I'm working on this custom gamemode, and so I was wondering if there was a way to create a entity that is invisible but a point, that when you use it and are aiming in it's direction near it you use it? Like in Radbox?
Uhh i am a bit confused on what you are saying but lets give it a shot [lua] function ENT:Initialize() self:SetModel("models/props_combine/health_charger001.mdl") self:PhysicsInit(SOLID_VPHYSICS) self:SetMoveType(MOVETYPE_VPHYSICS) self:SetSolid(SOLID_VPHYSICS) self:SetCollisionGroup(COLLISION_GROUP_WORLD) -- so people don't bump into a invisible item self:SetColor(255,255,255,0) -- make invisible OR go in to ENT:Draw() and remove it ( i don't know if that will work ) end function ENT:Think() for k,v in pairs(player.GetAll()) do if v:GetPos():Distance(self:GetPos()) < 400 then -- if there near the entity print('hey big daddy') end end end [/lua]
Sorry, you need to Log In to post a reply to this thread.