[url]http://wiki.garrysmod.com/page/ENTITY/Use[/url]
[code]ENT:Use( Entity activator, Entity caller, number useType, number value )[/code]
is the "caller"
[code] Entity activator
The initial cause for the input getting triggered.
Entity caller
The entity that directly triggered the input.[/code]
going to be the entity being used or the entity using?
For example, when using a WIRE user would the "caller" be the wire user? or the item the wire user is using
i cant seem to find any examples. i am trying to disable the use of a wire user with certain entities.
[editline]20th November 2015[/editline]
taken from the "wire user" code
[lua]
if trace.Entity.Use then
trace.Entity:Use(ply,ply,USE_ON,0)
else
trace.Entity:Fire("use","1",0)
end
[/lua]
from the looks of things the wire user sends that the player is both the activator and the caller. if that is the case then im going to have to find another way to block this without blocking the wire user
[editline]20th November 2015[/editline]
activator:KeyDown(IN_USE)
this looks promising, cheching on use if in_use is being pressed and maybe eye trace to the entity to make sure the user is actually standing there pressing e on it
derp, i guess eye tracing the activator doesnt work,
forcing the user to use the forth argument
number value
and then making sure the forth argument is not the same number works :)
Sorry, you need to Log In to post a reply to this thread.