Denizen/0.7/Interact Scripts/Triggers

From Citizens Wiki

< Denizen‎ | 0.7‎ | Interact Scripts

Revision as of 18:32, 5 February 2013 by AgentKid (talk | contribs)

Denizen Triggers trigger from interaction with Denizens. They are defined in the Steps: node of an Interact Script.

Trigger Types


Right Click

  • Click Triggers activate when the Denizen is right-clicked.
Click Trigger:
  Script:
  - CHAT "Teehee, that tickles!"
  - EMOTE "giggles"

Attack / Left Click

  • Damage Triggers activate when the Denizen is left-clicked. If the Denizen has Damage Triggers disabled, this will count as a Click Trigger.
Damage Trigger:
  Script:
  - CHAT "OUCH, You'll pay for that!"
  - STRIKE <PLAYER>

Proximity

  • Proximity Triggers activate when a player walks close to the Denizen.
Proximity Trigger:
  Script:
  - CHAT 'Eek! get away, you smell bad, <PLAYER>.'

Chat

  • Chat Triggers activate when players chat with Denizens. Players' chat within the configurable range will be directed to the Denizen instead of global chat. Chat also follows the configuration setting. a single chat trigger entry can handle multiple words, see below:
Chat Trigger:
  '1':
    Trigger: The word needed to /Trigger/ is inside slashes, this whole sentence will appear to be said by the player
    Script:
    - CHAT "Good to know!"
  '2':
    Trigger: A chat trigger can also catch on any word not otherwise caught using /*/. 
    Script:
    - CHAT "I don't know what you mean, <PLAYER>!"

Locations

  • Location Triggers activate when players walk near a Location Bookmark. Like chat triggers, multiple locations can be defined in one Location Trigger. They are similar in format to Chat Triggers in the fact that there can be multiple Locations per trigger entry.
Location Trigger:
  '1':
    Trigger: TreasureRoom
    Script:
    - TELEPORT BOOKMARK:Jail
  '2':
    Trigger: BedRoom
    Script:
    - NARRATE 'You enter the bedroom of the dead man, looking for clues'

Player Death

  • Playerdeath triggers activate when a Player dies. This trigger is disabled by default. The Trigger: node can be used to define the radius within which the player must die for the Denizen to see it. If the Trigger: is set to -1 the Denizen will attempt to handle any player deaths on the current world.
  Playerdeath Trigger:
    Radius: 50
    Script:
    - SHOUT "HA HA! <PLAYER> died!"


For a full list of Commands, see Commands