AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   entity touch..question (https://forums.alliedmods.net/showthread.php?t=46130)

jopmako 10-19-2006 01:44

entity touch..question
 
when two entity touch, how to get the touch point.
thx.

Emp` 10-19-2006 09:29

Re: entity touch..question
 
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)

jopmako 10-19-2006 16:55

Re: entity touch..question
 
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..

XxAvalanchexX 10-19-2006 18:55

Re: entity touch..question
 
Does the model travel only in a straight line, or does it bounce?

jopmako 10-20-2006 03:24

Re: entity touch..question
 
Quote:

Originally Posted by XxAvalanchexX (Post 392963)
Does the model travel only in a straight line, or does it bounce?

bounce.

XxAvalanchexX 10-21-2006 00:43

Re: entity touch..question
 
Hmm... on collision with a player, try calling a traceline from its previous origin to its current origin, and see what iHitGroup is.

jopmako 10-21-2006 06:14

Re: entity touch..question
 
Quote:

Originally Posted by XxAvalanchexX (Post 393389)
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.

XxAvalanchexX 10-21-2006 19:44

Re: entity touch..question
 
EV_VEC_oldorigin. Though I'm not sure if its automatically updated by the engine, you might have to set it yourself each think.

jopmako 10-22-2006 01:21

Re: entity touch..question
 
ok,thx for your help..


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

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