register_touch
- Синтаксис
-
native register_touch(const Touched[], const Toucher[], const function[]);
Переменная | Описание |
---|---|
Touched |
Entity classname being touched, "*" or "" for any class |
Toucher |
Entity classname touching, "*" or "" for any class |
function |
Name of callback function |
- Описание
- Registers a function to be called on a touch action between entities of specified classes.
- Пометка
-
The function will be called in the following manner: public touch_handler(touched, toucher) touched - Index of entity being touched toucher - Index of entity touching
- Пометка
-
The callback should return PLUGIN_CONTINUE to ignore the touch, PLUGIN_HANDLED or higher to block it.
- Пометка
-
When returning PLUGIN_HANDLED from the callback, Engine will still fire other touch functions like the pfn_touch() forward before actually blocking the touch. To immediately block return PLUGIN_HANDLED_MAIN instead.
- Возвращает
- Touch forward id