How to check if a wire input is connected ? [ ENT.Inputs["Name"].Value ]
0 replies, posted
Hi forum,
As i was coding my SEnt i've got Wiremod and Numpad inputs.
My dilemma is like:
[code]
function GetInput(Name)
local Value = 0
if ( my Wire input is connected )
--I have to ignore the Numpad and use Wire
Value = Ent.Inputs[Name].Value
else
--Numpad only and ignore Wire
Value is modifyed in a Numpad event
end
return Value
end
[/code]
How should i do that using WireLib maybe, because its visible everywhere.
Can i use "Connected" Table from "WireLib.CreateSpecialOutputs" like so:
[code]
if( not Ent.Inputs["InputName"].Connected ) then
// Ent.Inputs["InputName"].Connected == nil ...
// Some Code Here
end
[/code]
Regards DVD !
Sorry, you need to Log In to post a reply to this thread.