Touch npc events

This events can be called if player walk to tiles with area npc.

Depend on players number near area npc can be called different events.

Let say npc code have two touch event hadlers

Code example:

  ..
  OnTouch:
  mes "OnTouch called";
  close;
  
  OnTouchFirst:
  mes "OnTouchFirst called";
  close;
  ..

If first player walked to area npc, then will be called OnTouchFirst and player will see message “OnTouchFirst called”

If one or more players still near npc, and another player walked to area npc, then will be called OnTouch and player will see message “OnTouch called”

Let say npc code have only OnTouch hadlers

Code example:

  ..
  OnTouch:
  mes "OnTouch called";
  close;
  ..

If any player walking to area npc location, then will be called OnTouch and will see message “OnTouch called”

UnTouch npc events

This events can be called if player walk away from tiles with area npc.

Depend on players number near area npc can be called different events.

Let say npc code have two untouch event hadlers

Code example:

  ..
  OnUnTouch:
  mes "OnUnTouch called";
  close;
  
  OnUnTouchAll:
  mes "OnUnTouchAll called";
  close;
  ..

If last player walking from area npc tiles will be called OnUnTouchAll and player will see “OnUnTouchAll called”

If in area npc location more than one player and one of it moving away from npc location will be called OnUnTouch and player will see message “OnUnTouch called”

Let say npc code have only OnUnTouch hadlers

Code example:

  ..
  OnUnTouch:
  mes "OnUnTouch called";
  close;
  ..

If any player walking from npc location will be called OnUnTouch and player will see “OnUnTouch called”

Navigation
Print/export
Languages