Check if a player is inside/touching a trigger_ brush
3 replies, posted
Hello,
Here's my problem, I'm trying to detect whenever a player enters a trigger_ brush in order to get his outputs of it but I don't find how, I spent more than a hour on the Wiki and Google but nothing seems to answer my problem. I also tried to get the boundaries of a specific trigger_ brush and to detect if the player was on with "Vector:WithinAABox" but that doesn't work.
I checked this thread: [url]https://facepunch.com/showthread.php?t=1463733[/url] but it didn't work so far, I guess because a trigger_ entity isn't solid, so the PhysicsCollide doesn't work?
I also tried to make a SENT but the problem is that it overrides the trigger_ brush or if it don't I'll have to edit every maps with Hammer to edit the trigger name, what I don't want. Can't we extend an already existing entity?
I'm definitely stuck on that problem, could you help me please? Thanks.
cya' o/
Bump :cry:
This could be helpful:
[url]http://wiki.garrysmod.com/page/GM/AcceptInput[/url]
The following example should block any damage made by trigger_hurt.
[CODE]
hook.Add("AcceptInput", "PrintSomething", function(ent,input,act,cal,val)
if ent:GetClass() == "trigger_hurt" then
return true
end
end)
[/CODE]
Thank you very much for your answer, I tried to use the hook in order to do some stuff but it doesn't seems to work, anyway, I googled "AcceptInput" and found a thread that is resolving exactly what I want:
[url]https://facepunch.com/showthread.php?t=1504557[/url]
Thank you very much for your answer which without, I couldn't have found the topic. :goodjob:
Sorry, you need to Log In to post a reply to this thread.