Difference between revisions of "Event Reference Behavior"

From Tuxepedia
Jump to navigation Jump to search
 
Line 27: Line 27:


'''Examples'''
'''Examples'''
door player,house_interior,5,3,up
* door player,house_interior,5,3,up
door npc_guard,town_square,10,12,right
* door npc_guard,town_square,10,12,right


=== TalkBehavior ===
=== TalkBehavior ===
Line 50: Line 50:


'''Examples'''
'''Examples'''
talk npc_maple
* talk npc_maple
talk shopkeeper
* talk shopkeeper

Latest revision as of 15:44, 2 February 2026

Behaviors[edit | edit source]

DoorBehavior[edit | edit source]

Expand a `door` behavior into the conditions and actions required to transition a character through a doorway or portal.

  • This behavior triggers when:
  • The character is standing on the door tile.
  • The character is facing the required direction.

Once triggered, the character is teleported to the specified destination coordinates and oriented to the given direction.

Usage

door <character>,<destination>,<x>,<y>,<direction>

Parameters

  • character: The character slug (e.g. "player" or an NPC).
  • destination: The map slug to teleport to.
  • x: X-coordinate on the destination map.
  • y: Y-coordinate on the destination map.
  • direction: The direction the character must face to activate

the door, and the direction they will face after teleporting.

Examples

  • door player,house_interior,5,3,up
  • door npc_guard,town_square,10,12,right

TalkBehavior[edit | edit source]

Expand a `talk` behavior into the conditions and actions required to initiate an interaction between the player and an NPC.

  • This behavior triggers when:
  • The player is facing the specified NPC.
  • The player presses the INTERACT button.

Once triggered, the NPC will automatically turn to face the player.

Usage

talk <npc>

Parameters

  • npc: The slug/name of the NPC the player can talk to.

Examples

  • talk npc_maple
  • talk shopkeeper