AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Touched by the same object (https://forums.alliedmods.net/showthread.php?t=189698)

doondook 07-10-2012 02:27

Touched by the same object
 
Code:
register_touch("classname", "classname", "touch_classname")

In this case touch_classname() will be executed twice (for each entity). How to handle such touch only one time?

HLM 07-10-2012 06:41

Re: Touched by the same object
 
you would have to check if its already been touched, unfortunately I wouldn't know how to check for this, there is probably a string or int saved to the entity that can be checked against your classname/entID

doondook 07-10-2012 07:58

Re: Touched by the same object
 
Yes, it's obvious way, but I'm looking for a more accurate method.

jimaway 07-10-2012 08:15

Re: Touched by the same object
 
change entity to SOLID_NOT or remove the entity if you want it to be untouchable after first touch

doondook 07-10-2012 08:18

Re: Touched by the same object
 
Sad. Thanks.


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

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