Denizen/0.7/Interact Scripts/Triggers: Difference between revisions
From Citizens Wiki
< Denizen | 0.7 | Interact Scripts
Line 53: | Line 53: | ||
===Locations=== | ===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 | * '''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 Locations per trigger entry. | ||
<pre> | <pre> |
Revision as of 05:04, 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 Locations per trigger entry.
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