Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local outfit = {
- -- start of outfit.txt
- [1] = {
- ["children"] = {
- [1] = {
- ["children"] = {
- [1] = {
- ["children"] = {
- },
- ["self"] = {
- ["ClassName"] = "proxy",
- ["UniqueID"] = "3120004463",
- ["Expression"] = "hsv_to_color(time()*100)",
- ["GlobalID"] = "4180875644",
- ["VariableName"] = "Color",
- },
- },
- },
- ["self"] = {
- ["UniqueID"] = "884479784",
- ["GlobalID"] = "1864536752",
- ["Position"] = Vector(0, 0, 28),
- ["Size"] = 2.175,
- ["Color"] = Vector(255, 12, 0),
- ["EditorExpand"] = true,
- ["Model"] = "models/pac/default.mdl",
- ["ClassName"] = "model",
- ["Name"] = "ball",
- },
- },
- },
- ["self"] = {
- ["ClassName"] = "group",
- ["OwnerName"] = "self",
- ["EditorExpand"] = true,
- ["GlobalID"] = "3872319760",
- ["UniqueID"] = "3296086797",
- ["Name"] = "my outfit",
- ["Description"] = "add parts to me!",
- },
- },
- -- end of outfit.txt
- }
- local ENT = {}
- ENT.Base = "base_anim"
- ENT.Type = "anim"
- ENT.ClassName = "pac_test"
- if CLIENT then
- pac.SetupENT(ENT)
- function ENT:Draw()
- self:DrawModel()
- end
- function ENT:Think()
- -- manipualte it here!
- if self.ball then
- self.ball:SetSize(2 + math.sin(RealTime()))
- end
- end
- function ENT:Initialize()
- self:AttachPACPart(outfit)
- -- find the ball part
- self.ball = self:FindPACPart(outfit, "ball")
- end
- function ENT:OnRemove()
- self:RemovePACPart(outfit)
- end
- end
- if SERVER then
- function ENT:Initialize()
- self:SetModel("models/props_borealis/bluebarrel001.mdl")
- self:PhysicsInit(SOLID_VPHYSICS)
- self:SetMoveType(MOVETYPE_NONE)
- end
- end
- scripted_ents.Register(ENT, ENT.ClassName)
Advertisement
Add Comment
Please, Sign In to add comment