• how in the entity spawn the entity
    4 replies, posted
like this https://files.facepunch.com/forum/upload/243370/ce029d26-d1aa-4b83-9b0b-01d7a7e5312d/image.png
When creating a Entity, inside of said Entity you can spawn another one using ents.Create And then using Entity/SetPos you can set the position of that entity. (the vector position is oriented from the very first entity that has been spawned)
You can use in cl_init local Customprop = { { ang = Angle(90, 0, 0),-- Angle mdl = "models/hunter/plates/plate1x1.mdl", -- Prop(model) color = Color(255, 255, 255), -- Color  pos = Vector(0, 0, 0), -- Position }, { ang = Angle(90, 90, 0), mdl = "models/hunter/plates/plate1x1.mdl", pos = Vector(0, 10, 6), }, } function ENT:Initialize() for k, v in pairs( Customprop ) do local ent = ClientsideModel( v.mdl, RENDERGROUP_BOTH ) ent:SetPos( self:LocalToWorld(v.pos) ) ent:SetAngles( self:LocalToWorldAngles(v.ang) ) ent:SetParent( self ) ent:PhysicsInit(SOLID_VPHYSICS) ent:SetSolid(SOLID_VPHYSICS) ent:PhysWake() end end
but he doesn't want a clientside model?
To add, I want to in entity use a some key or button to spawn a new entity inside the entity
Sorry, you need to Log In to post a reply to this thread.