world_setup:game_features:tasks
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
world_setup:game_features:tasks [2023/07/12 15:31] – [*dotaskparam] mit | world_setup:game_features:tasks [2023/07/12 16:08] (current) – [Example task process] mit | ||
---|---|---|---|
Line 9: | Line 9: | ||
===== Example task process ===== | ===== Example task process ===== | ||
To implement the tree ' | To implement the tree ' | ||
- | * Unordered List ItemUsing | + | * Using the building editor, create the building as a ' |
* Implement the building access script as shown: | * Implement the building access script as shown: | ||
< | < | ||
Line 93: | Line 93: | ||
^ Description | Activates the task display for the specified player in relation to the specified building. | ^ Description | Activates the task display for the specified player in relation to the specified building. | ||
^ Example | '' | ^ Example | '' | ||
+ | |||
==== *dobuildingtaskparam ==== | ==== *dobuildingtaskparam ==== | ||
+ | ^ Format | *dobuildingtask [PLAYER_NAME] [BUILDING_ID] [TASKCODE/ | ||
+ | ^ Description | Activates the task display for the specified player in relation to the specified building. | ||
+ | ^ Example | '' | ||
- | ==== *docombitask ==== | + | As with the *dotask equivalents, |
==== *showtask ==== | ==== *showtask ==== | ||
+ | ^ Format | *showtask [PLAYER_NAME] | | ||
+ | ^ Description | This is a sysop/debug command that tells you the current state of the task for the specified player | ||
===== Task scripting ===== | ===== Task scripting ===== | ||
Line 104: | Line 110: | ||
Call this function from one of the TaskStart events to set the number of seconds that the task will last for. \\ | Call this function from one of the TaskStart events to set the number of seconds that the task will last for. \\ | ||
- | |||
- | === $gTaskItem1 === | ||
- | === $gTaskItem2 === | ||
- | === $gTaskItem3 === | ||
These script System Values provide the item numbers that were used in the '' | These script System Values provide the item numbers that were used in the '' | ||
***dobuildingtask** and ***dobuildingtaskparam** trigger: \\ | ***dobuildingtask** and ***dobuildingtaskparam** trigger: \\ | ||
- | '' | + | '' |
- | '' | + | '' |
***dotask** and ***dotaskparam** trigger: \\ | ***dotask** and ***dotaskparam** trigger: \\ | ||
'' | '' | ||
'' | '' | ||
- | |||
- | ***docombitask** and ***docombitaskparam** trigger: \\ | ||
- | '' | ||
- | '' | ||
- | |||
TaskStart and TaskComplete events are triggered on all types of task (i.e. from all of the *do.. commands). | TaskStart and TaskComplete events are triggered on all types of task (i.e. from all of the *do.. commands). | ||
Line 143: | Line 140: | ||
+ | ==== Combination tasks ==== | ||
+ | |||
+ | You probably don't need to use combination tasks unless you're doing something very funky. (They were used on some early worlds to build a complex, but probably rather daft, crafting system which used the combination of items to generate a single code that could be looked up to find the resulting item - e.g. combining items 12, 39 and 41 would generate a code 12039041 and there' | ||
+ | |||
+ | Anyway.. for reference: | ||
+ | |||
+ | ==== *docombitask ==== | ||
+ | ^ Format | *docombitask [PLAYER_NAME] [ITEM1] [ITEM2] [ITEM3] | | ||
+ | ^ Description | Activates the task display for the specified player with relation to the specified item numbers | | ||
+ | ^ Example | '' | ||
+ | |||
+ | |||
+ | Combi tasks also make use of the system values : \\ | ||
+ | **$gTaskItem1**, | ||
+ | which correspond to the three values used in the combitask command | ||
+ | |||
+ | |||
+ | ***docombitask** and ***docombitaskparam** trigger: \\ | ||
+ | '' | ||
+ | '' | ||
world_setup/game_features/tasks.1689193889.txt.gz · Last modified: 2023/07/12 15:31 by mit