Raised This Month: $32 Target: $400
 8% 

no collision but also trigger touch event?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
niente
New Member
Join Date: Oct 2011
Old 10-21-2011 , 04:25   no collision but also trigger touch event?
Reply With Quote #1

My first time to post here

Working on a TF2 plugin. I am trying spawn few entities on the map (as a checkpoint) which allow player to pass through but also will trigger event to indicate player touched.

I try using sdkhooks start touch event but it seems only works on solid objects. When I change the collision group of the checkpoint, the player is able to go through but the touch event won't happen.

Is there any ways to achieve this?

Last edited by niente; 10-22-2011 at 09:24.
niente is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 10-22-2011 , 16:03   Re: no collision but also trigger touch event?
Reply With Quote #2

you can do it with m_usSolidFlags and m_nSolidType, there are values that will make the entity non solid but still fire touch events. i'm sorry i can't remember how to do it but i did test it, you need to check the sdk const.h for the values.

Last edited by blodia; 10-24-2011 at 18:45.
blodia is offline
niente
New Member
Join Date: Oct 2011
Old 10-22-2011 , 17:14   Re: no collision but also trigger touch event?
Reply With Quote #3

Quote:
Originally Posted by blodia View Post
you can do it with m_usSolidFlags and m_nSolidType, there are values that will make the entity non solid but still fire touch events. i'm sorry i can't remember(concussion) how to do it but i did test it, you need to check the sdk const.h
I tried both of them before and it didn't work, maybe I choose the wrong type. Now that I know it's possible I may test with other types. Thx for the help
niente is offline
icequeenzz
Member
Join Date: May 2008
Old 10-23-2011 , 07:30   Re: no collision but also trigger touch event?
Reply With Quote #4

i think this will do the trick:

PHP Code:
SetEntProp(PropProp_Send"m_usSolidFlags"12); //FSOLID_NOT_SOLID|FSOLID_TRIGGER
SetEntProp(PropProp_Data"m_nSolidType"6); // SOLID_VPHYSICS
SetEntProp(PropProp_Send"m_CollisionGroup"1); //COLLISION_GROUP_DEBRIS 
__________________

icequeenzz is offline
niente
New Member
Join Date: Oct 2011
Old 10-23-2011 , 16:17   Re: no collision but also trigger touch event?
Reply With Quote #5

Work just great, thx!
niente is offline
Reply



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 17:50.


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