-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Action and task programs #39
Comments
The "advanced_npc:idle" program is a program meant to be run when NPC are doing nothing and standing idle. It has two main features (as-of the moment, more planned):
Both features above are disabable. |
About Is this documentation completely correct? #### `NODE QUERY` (advanced_npc:node_query)
Check and run a program with nodes found near.
{
range = 2, -- Range of checked area in blocks.
count = 20, -- How many checks will be performed.
random_execution_times = true, --[[
^ Randomizes the number of checks that will be performed.
^ min_count and max_count is required ]]
min_count = 20, -- minimum of checks
max_count = 25, -- maximum of checks
nodes = {"itemstring1", "itemstring2"}, --[[
^ Nodes to be found for the actions.
^ When a node is found, it is add in the npc place map
with the place name "schedule_target_pos"
prefer_last_acted_upon_node = true, -- If prefer to act on nodes already acted upon
walkable_nodes = {"itemstring1", "itemstring2"}, -- Walkable nodes
on_found_executables = { --[[
^ Table where index is a itemstring of the node to be found,
and value is an array of programs to be performed
when found the node. ]]
["itemstring1"] = {
[1] = <program>,
[2] = <program>,
[3] = <program>
},
["itemstring2"] = {
[1] = <program>,
[2] = <program>
}
},
on_not_found_executables = { --[[
^ An array of programs to be performed when not found any node.
[1] = <program>,
[2] = <program>
},
state_program_on_finished = <program> --[[
^ [OPTIONAL]
^ A state program performed after ending all check counts ]]
} EDIT: state_program_on_finished included |
I am already working on updating the documentation with the new tasks and actions that will work in program format.
I would like to use this issue for explanations on some programs.
Can you explain more details about the IDLE (
"advanced_npc:idle"
) program? To better understand ways it can be used.The text was updated successfully, but these errors were encountered: