Raised This Month: $ Target: $400
 0% 

entity touch..question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 10-19-2006 , 01:44   entity touch..question
Reply With Quote #1

when two entity touch, how to get the touch point.
thx.
__________________
QQ31537639
jopmako is offline
Send a message via MSN to jopmako
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 10-19-2006 , 09:29   Re: entity touch..question
Reply With Quote #2

if you mean like what part touches what (arm touches leg) then it is not possible.

otherwise if you just want to know when two things touch, you can do any of the following:
[ENGINE]
pfn_touch(ent1, ent2)
register_touch("classname", "classname2", "your_function")
[FM]
register_forward(FM_Touch, "your_function")

pretty sure that explains it (if you need more info, ask)
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 10-19-2006 , 16:55   Re: entity touch..question
Reply With Quote #3

ok thx.

i am make a plugin throw a MDL out and it may touch a player or other entity,when the two entity touch,I know we can get the even like you did,but can we get the hitpoint(world) of the two entity,not the toucher entity

something like trace_line did return hitpoint[3]

sorry,i can only use the poor english for explain this..
__________________
QQ31537639
jopmako is offline
Send a message via MSN to jopmako
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-19-2006 , 18:55   Re: entity touch..question
Reply With Quote #4

Does the model travel only in a straight line, or does it bounce?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 10-20-2006 , 03:24   Re: entity touch..question
Reply With Quote #5

Quote:
Originally Posted by XxAvalanchexX View Post
Does the model travel only in a straight line, or does it bounce?
bounce.
__________________
QQ31537639
jopmako is offline
Send a message via MSN to jopmako
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-21-2006 , 00:43   Re: entity touch..question
Reply With Quote #6

Hmm... on collision with a player, try calling a traceline from its previous origin to its current origin, and see what iHitGroup is.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 10-21-2006 , 06:14   Re: entity touch..question
Reply With Quote #7

Quote:
Originally Posted by XxAvalanchexX View Post
Hmm... on collision with a player, try calling a traceline from its previous origin to its current origin, and see what iHitGroup is.
how to get the previous origin of entity?
thx.
__________________
QQ31537639
jopmako is offline
Send a message via MSN to jopmako
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-21-2006 , 19:44   Re: entity touch..question
Reply With Quote #8

EV_VEC_oldorigin. Though I'm not sure if its automatically updated by the engine, you might have to set it yourself each think.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 10-22-2006 , 01:21   Re: entity touch..question
Reply With Quote #9

ok,thx for your help..
__________________
QQ31537639
jopmako is offline
Send a message via MSN to jopmako
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 04:52.


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