Add Actions and Tasks documentation

This commit is contained in:
BrunoMine 2017-10-23 21:16:07 -02:00 committed by GitHub
parent c89cca24a1
commit 4170d56e62
1 changed files with 35 additions and 0 deletions

35
doc/actions_and_tasks.txt Normal file
View File

@ -0,0 +1,35 @@
Actions and Tasks
Advanced_NPC Alpha-2 (DEV)
==========================
IMPORTANT: In this documentation is only the explanation of the particular operation of each predefined
action and task. Read reference documentation for details about API operation at `API.txt`.
Action (`add_action`)
---------------------
* `SET_INTERVAL` : Set the interval at which the `action` are executed.
args = {
interval = 1, -- A decimal number, in seconds (default is 1 second)
freeze = false, -- if true, mobs_redo API will not execute until interval is set
}
* `FREEZE` : This action allows to stop/execute mobs_redo API.
This is good for stopping the NPC from fighting, wandering, etc.
Arguments table definition
{
freeze = false, -- Boolean, if true, mobs_redo API will not execute.
}
Tasks (`add_task`)
------------------
* `USE_BED` : Sequence of actions that allows the NPC to use a bed.
Arguments table definition
{
pos = {x=0,y=0,z=0}, -- Position of bed to be used.
action = action, --[[
^ Whether to get up or lay on bed
^ Defined in npc.actions.const.beds.action
^ Example: npc.actions.const.beds.action.LAY ]]
}