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