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

From Citizens Wiki
Line 223: Line 223:
{{Denizen Command Color 2|mintcream|
{{Denizen Command Color 2|mintcream|
WALKTO
WALKTO
|[BOOKMARK:LocationBookmark] or [ 'BOOKMARK:DenizenName:LocationBookmark'] or [PLAYER]
|[BOOKMARK:LocationBookmark] or [ 'BOOKMARK:DenizenName:LocationBookmark'] or [PLAYER] (SPEED:#)
| Makes the denizen walk to the specified location bookmark, or to the interacting player. Interrupts any current movement, and pauses the NPC pathing if active.
|Makes the denizen walk to the specified location bookmark, or to the interacting player. Interrupts any current movement, and pauses the NPC pathing if active.
Modifiers:
* SPEED: is the movement speed, generally should be between 0.1 and 1.5
'''Example Usages'''
'''Example Usages'''
<pre>
<pre>
- WALKTO PLAYER
- WALKTO PLAYER
- WALKTO 'BOOKMARK:Gary:GarysHouse'
- WALKTO 'BOOKMARK:Gary:GarysHouse'
</pre>
}}
{{Denizen Command Color 2|mintcream|
WALK
|(FORWARD:#) (NORTH:#) (SOUTH:#) (EAST:#) (WEST:#) (UP:#) (DOWN:#) (X:#) (Y:#) (Z:#) (SPEED:#)
|Makes the denizen walk some distance from its current position.  Interrupts any current movement, and pauses the NPC pathing if active. All provided directions are added into one movement. Decimal and negative values are accepted.
Modifiers:
* SPEED: is the movement speed, generally should be between 0.1 and 1.5
* FORWARD: makes the Denizen walk in whatever direction it is currently facing. Combine LOOK CLOSE and a negative value to walk directly away from the player.
* +X is the same as EAST
* +Y is the same as UP
* +Z is the same as NORTH
'''Example Usages'''
<pre>
- WALK NORTH;4 EAST:2.5
- WALK FORWARD:1
</pre>
</pre>
}}
}}
Line 234: Line 253:
{{Denizen Command Color 2|mintcream|
{{Denizen Command Color 2|mintcream|
RETURN
RETURN
|
|(SPEED:#)
| Makes the denizen walk back to the spot it was at before a call to WALKTO. Will resume NPC pathing if set.
|Makes the denizen walk back to the position it was at before a call to WALKTO or WALK. Will resume NPC pathing if set.
Modifiers:
* SPEED: is the movement speed, generally should be between 0.1 and 1.5
 
'''Example Usages'''
'''Example Usages'''
<pre>
<pre>
Line 243: Line 265:
}}
}}


* WALK [Z] [X] [Y]  Note: Z(-NORTH(2)/+SOUTH(0)) X(-WEST(1)/+EAST(3)) Y (+UP/-DOWN)
{{Denizen Command Color 2|mintcream|
*: </code>Makes the Denizen walk. This is not for making the Denizen to specific coordinates. The values for X Y and Z will get added or subtracted from the Denizen's current location.<code>
PAUSE
|(DURATION:#)
|Causes the Denizen to stop any pathing or activities. Useful for keeping it in place during an interaction.
Modifiers:
*DURATION:
::Automatically RESUME after the specified number of seconds.
'''Example Usages'''
<pre>
- PAUSE
- PAUSE DURATION:30
</pre>
}}
 
{{Denizen Command Color 2|mintcream|
RESUME
|
|Cancels a previous PAUSE command.
'''Example Usages'''
<pre>
- RESUME
</pre>
}}


====World Interaction Commands====
====World Interaction Commands====

Revision as of 05:04, 21 August 2012

Interact Script Commands

Note: There are plenty more to come, be patient, more are coming! Have ideas for a good command? Let me know!

[] indicates required field, () indicates an optional field, OR indicates alternative usage.

Script Flow Commands

These commands have no external affect on the world, but can control the flow of scripts within Denizen. Though not required, and with the exception of WAIT, it is generally recommended to run these as Instant Commands to ensure smooth Script feedback to players.

Server Commands

The commands below require Vault and a valid permissions system. Though Vault is not required to use Denizen, the commands below DO require Vault and its dependencies to be installed. Remember: Vault is not an economy or permissions system, merely a hook to help Denizen connect to your favorite systems!

Text Commands

These commands show some text to the player interacting, and usually to bystanders around. Note that all text commands must be surrounded by quotes single ' or double ". See: Which Quotes? for more information. Text commands also have some auto-formatting, such as making sure no words will be cut off on long messages, and applying color codes. See: Denizen Color Codes. Formatting for how NPCs and Players talk can be customized in the config.yml.

You can use the following placeholders to fill in specific information:

  • <NPC> - The Denizens's name.
  • <PLAYER> - The interacting Player's name
  • <DISPLAYNAME> - The interacting Player's display name
  • <HEALTH> - The interacting Player's heath
  • <WORLD> - The name of the Denizen's world

If you use the NOPLAYER modifier on a text command the <PLAYER>, <DISPLAYNAME> and <HEALTH> tags are not available.

Denizen NPC Commands

Denizen NPC commands are meant to help bring your Denizen to life by allowing fine-control of small movements. These are not necessarily meant for making the Denizen NPC do large/long activities, those will instead be done by the Activities, which is just now starting to be implemented into Denizen. The next 'large' update will focus on Activities.

World Interaction Commands

These commands do something physical to the world or player.

Player Interaction Commands