Detecting Ground Touch
I am trying to find the best way to determine when a weapon touches the ground after it has been dropped. I was thinking about either hooking the "drop" command or forwarding Ham_Item_Drop to know when it drops, but I wasn't sure about the best way to tell when it hits the ground. Any information at all is helpful. Thanks.
|
Re: Detecting Ground Touch
PHP Code:
PHP Code:
PHP Code:
|
Re: Detecting Ground Touch
Quote:
|
Re: Detecting Ground Touch
If you really want to do this for a certain weapon drop event, you can enable the Think forward for that weapon once it is dropped, check if it is on the ground in the think, and if it's on the ground, do what you need to do there and then unregister the forward.
|
Re: Detecting Ground Touch
Quote:
|
Re: Detecting Ground Touch
Quote:
RegisterHam() EnableHamForward() DisableHamForward() FM_Think register_forward() unregister_forward() |
Re: Detecting Ground Touch
Quote:
|
Re: Detecting Ground Touch
Quote:
|
Re: Detecting Ground Touch
Why not register_touch ?
|
Re: Detecting Ground Touch
Quote:
PHP Code:
PHP Code:
|
| All times are GMT -4. The time now is 14:44. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.