I am trying to do something to an NPC.
So first of all the npc is a scanner so like here is an example: https://developer.valvesoftware.com/wiki/Npc_cscanner
So thats the scanner NPC I am using to do something but there is another one https://developer.valvesoftware.com/wiki/Npc_clawscanner which hase also same stuff like the City scanner just I think it has two more inputs.
So first of all it spawns a scanner it creates one that I can control with WASD cause its a flying NPC that uses a different AI system.
I am trying to enable the Spotlight via a command.
I am using this function: http://wiki.garrysmod.com/page/Entity/SetKeyValue
My code is fine but the function has problems so the code can run but it doesn’t do what I want I guess. Normaly it should turn on the spotlight well but I was wrong. After testing with the tool I found out some stuff.
First of all:
SpotlightLength <integer> DEFAULT = 500
Length of the scanner’s spotlight.
SpotlightWidth <integer> DEFAULT = 50
Width of the scanner’s spotlight.
Those are easy to understand.
Now there is another one called SpotlightDisabled.
Start with the scanner’s spotlight turned off.
Now lets ignore the description of SpotlightDisabled cause at my testing with the NPC toolgun (which is from an addon) did something else.
First of all 1 means that it is disabled and 0 means that it is enabled.
Having this enabled doesn’t make the scanner spawn with the spotlight it does give it the possibility to enable it.
Having this disabled then it can’t use the spotlight.
The original NPC scanner turned his spotlight it self on, means that there is a cind of other thing to enable the spotlight, but I don’t know. And I think this could only be an input.
There is an input called:
To do: add description
Yes sadly there is no description for it and I wanted to test this input at Hammer Editor but I am not sure if it will work.
What I want to reach is that the scanner enables or disables it by my command.