Raised This Month: $ Target: $400
 0% 

Touched by the same object


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
doondook
Member
Join Date: Dec 2010
Old 07-10-2012 , 02:27   Touched by the same object
Reply With Quote #1

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?
doondook is offline
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 07-10-2012 , 06:41   Re: Touched by the same object
Reply With Quote #2

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
__________________
+|- KARMA Respectively

HLM is offline
doondook
Member
Join Date: Dec 2010
Old 07-10-2012 , 07:58   Re: Touched by the same object
Reply With Quote #3

Yes, it's obvious way, but I'm looking for a more accurate method.
doondook is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 07-10-2012 , 08:15   Re: Touched by the same object
Reply With Quote #4

change entity to SOLID_NOT or remove the entity if you want it to be untouchable after first touch

Last edited by jimaway; 07-10-2012 at 08:17.
jimaway is offline
doondook
Member
Join Date: Dec 2010
Old 07-10-2012 , 08:18   Re: Touched by the same object
Reply With Quote #5

Sad. Thanks.
doondook is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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