Hey, I want to create an entity that's made up of more than just one model. Let's say you press E on it and then you get ammo. That's simple enough and I got that.
But the entity itself shouldn't be just one crate model, but three and perhaps have even more models.
Like you can see here
[t]http://i.imgur.com/WFidplX.jpg[/t]
How do I do that though?
Well, you can try something like this:
[CODE]local tbPos = {
{pos = Vector(0, 0, 50), ang = Angle(0, 10, 0)},
{pos = Vector(-50, 0, 0), ang = Angle(0, 0, 0)},
{pos = Vector(50, 0, 0), ang = Angle(0, 0, 0)},
};
function ENT:Draw()
local vecOrigin = self:GetPos();
for k,v in next, tbPos do
self:SetPos(vecOrigin + v["pos"]);
self:SetAngles(v["ang"]);
self:SetupBones();
self:DrawModel();
end
self:SetPos(vecOrigin);
end
[/CODE]
not tested, and probably not a very good way of doing it, you could make an entity that spawns 3 props internally aswell, again, not tested
Your example looks like it could just be a single model, comprised of all those other models.
It would be the least buggy way but also requires modelling skills
Sorry, you need to Log In to post a reply to this thread.