[TUT] Touch Stuff
Today we will discuss about touch stuff.
We will talk about: 1. Touch with natives 2. Forwards touch 3. Block touch operation 4. Fake touch So, let's start 1. Touch with natives Engine way: PHP Code:
touched = Who are touched by Toucher toucher = Who touch If you want to filter touched / toucher An example : Only running hook_touch if a player touch something.. PHP Code:
2. Forwards touch: Engine way: PHP Code:
Fakemeta way: PHP Code:
3. Block touch operation: On Engine: To block touch use return PLUGIN_HANDLED; On Fakemeta: use return FMRES_SUPERCEDE; 4. Fake Touch: This will simulates two entities colliding/touching. Engine: PHP Code:
PHP Code:
|
Re: [TUT] Touch Stuff
I don't think I've ever seen anything as general as this, but for a list, it's nice.
|
Re: [TUT] Touch Stuff
so this is basically if 2 players touch?
|
Re: [TUT] Touch Stuff
2 players touch, one player and one entity or 2 entityes
|
Re: [TUT] Touch Stuff
oohhh lol im such a newb.
good tutorial |
Re: [TUT] Touch Stuff
Quote:
|
Re: [TUT] Touch Stuff
Quote:
|
Re: [TUT] Touch Stuff
A little thing to add to the tutorial,that you can filter toucher/touched in register_touch.
Example:Only running hook_touch if a player touch something Code:
|
Re: [TUT] Touch Stuff
thx for the note
- updated the tut* |
Re: [TUT] Touch Stuff
One question,
why doesn't this work? Code:
|
All times are GMT -4. The time now is 11:09. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.