AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   No touching an entity (https://forums.alliedmods.net/showthread.php?t=232213)

W12 12-27-2013 09:53

No touching an entity
 
Hi alliedmods.
As you know to hook when a player touch someting we have a lot of ways, but how I can hook/detect when a player no touching an entity?
Thanks.

jimaway 12-27-2013 14:08

Re: No touching an entity
 
save get_gametime or something similar to a variable in the touch forward, and then use time comparison to check if player is still touching the entity or not in a forward of your choice

W12 12-27-2013 15:35

Re: No touching an entity
 
I thought to create a bool variables for all players (or just 1 variable using bits) and make it false in prethink then in touch forward to make it true and finally, in postthink to check if player touch the entity.
But both ways are not so good for server.
Do you know/Exist another way more efficient to do that?


All times are GMT -4. The time now is 10:10.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.