Denizen/0.7/Interact Scripts/Triggers: Difference between revisions

From Citizens Wiki
(Created page with "====Trigger Nodes==== <div style="margin-right:2.0em; padding:10px; font-family:museo-sans; font-size:110%;"> Steps handle the flow of commands and messages with triggers. ''...")
 
Line 1: Line 1:
====Trigger Nodes====
Denizen Triggers trigger from interaction with Denizens. They are defined in the Steps: node of an Interact Script.
 
==Trigger Types==
<div style="margin-right:2.0em; padding:10px; font-family:museo-sans; font-size:110%;">
<div style="margin-right:2.0em; padding:10px; font-family:museo-sans; font-size:110%;">
Steps handle the flow of commands and messages with triggers.


'''Denizen Triggers''' trigger from interaction with Denizens. They are defined in the Steps: node.
 
===Right Click===


* '''Click Trigger'''s activate when the Denizen is right-clicked.
* '''Click Trigger'''s activate when the Denizen is right-clicked.
Line 12: Line 14:
   - EMOTE "giggles"
   - EMOTE "giggles"
</pre>
</pre>
===Attack / Left Click===


* '''Damage Trigger'''s activate when the Denizen is left-clicked. If the Denizen has Damage Triggers disabled, this will count as a Click Trigger.
* '''Damage Trigger'''s activate when the Denizen is left-clicked. If the Denizen has Damage Triggers disabled, this will count as a Click Trigger.
Line 20: Line 24:
   - STRIKE <PLAYER>
   - STRIKE <PLAYER>
</pre>
</pre>
===Proximity===


* '''Proximity Trigger'''s activate when a player walks close to the Denizen.
* '''Proximity Trigger'''s activate when a player walks close to the Denizen.
Line 29: Line 35:
</pre>
</pre>


===Chat===


* '''Chat Trigger'''s 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'''s 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:
Line 43: Line 50:
     - CHAT "I don't know what <*> mean, <PLAYER>!"
     - CHAT "I don't know what <*> mean, <PLAYER>!"
</pre>
</pre>
===Locations===


* '''Location Trigger'''s 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 triggers per step.
* '''Location Trigger'''s 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 triggers per step.

Revision as of 05:02, 17 August 2012

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 <*> 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 triggers per step.
Location Trigger:
  '1':
    Trigger: TreasureRoom
    - TELEPORT BOOKMARK:Jail
  '2':
    Trigger: BedRoom
    - NARRATE 'You enter the bedroom of the dead man, looking for clues'

For a full list of commands, see #Script Commands