• Wiremod.
    4 replies, posted
I have been playing around with lua and I was wondering what's the command to add wire inputs/outputs and how to assign variables to them. Anyone?
For adding them: [lua] self.Inputs = Wire_CreateInputs(self.Entity,{"X","Y","Z"}); self.Outputs = Wire_CreateOutputs(self.Entity,{"Disable"}) [/lua] For defining them: [lua] function ENT:TriggerInput(k,v) if(k == "X") then self.PositionSet = true; self.Target.x = v; elseif(k == "Y") then self.PositionSet = true; self.Target.y = v; elseif(k == "Z") then self.PositionSet = true; self.Target.z = v; end end [/lua]
What about outputs?(assigning a variable, that is)
Look through the damn Wire source code.
One of the more reasons why Lua is not pre-complied.
Sorry, you need to Log In to post a reply to this thread.