|
1 #summary Lua library documentation: SpeedShoppa |
|
2 #labels LuaLibrary |
|
3 |
|
4 = Lua library: `SpeedShoppa` = |
|
5 Starting with 0.9.22, this Lua library provides a function to create a simple shoppa-style mission. |
|
6 |
|
7 In `SpeedShoppa` missions, the player starts with infinite ropes and has to collect all crates as fast as possible and compete for the fastest time. |
|
8 |
|
9 == `SpeedShoppaMission(params)` == |
|
10 This function sets up the *entire* mission and needs one argument: `params`. |
|
11 The argument “`params`” is a table containing fields which describe the training mission. |
|
12 |
|
13 Mandatory fields: |
|
14 |
|
15 || *Field name* || *Description* || |
|
16 || `map` || The name of the map to be used || |
|
17 || `theme` || The name of the theme (does not need to be a standalone theme) || |
|
18 || `time` || The time limit in milliseconds || |
|
19 || `crates` || The coordinates of where the crates will be spawned. It is a table containing tables containing coordinates of format `{ x=value, y=value }`. There must be at least 1 crate. || |
|
20 |
|
21 Optional fields: |
|
22 |
|
23 || *Field name* || *Description* || |
|
24 || `missionTitle` || The name of the mission (optional but highly recommended) (default: `"Speed Shoppa"`) || |
|
25 || `hogHat` || Hat of the hedgehog (default: `"NoHat"`) || |
|
26 || `hogName` || Name of the hedgehog (default: `"Roper"`) || |
|
27 || `teamName` || Name of the hedgehog’s team (default: `"Shoppers"`) || |
|
28 || `teamGrave` || Name of the hedgehog’s grave (default: `"Statue"`) || |
|
29 || `teamFlag` || Name of the team’s flag (default: `"cm_shoppa"`) || |
|
30 || `clanColor` || Color of the (only) clan (default: `0xFF0204`, which is a red tone) || |
|
31 || `goalText` || A short string explaining the goal of the mission (default: `"Use your rope to collect all crates as fast as possible."`) || |
|
32 || `faceLeft` || If `true`, the hog faces to the left initially, if false, it faces to the right. (default: `false` (=right)) || |
|
33 || `crateType` || Specify the type of crate (this has no gameplay effect), pick one of `"ammo"`, `"utility"`, `"health"`. Default: `"ammo"` || |
|
34 || `extra_onGameStart` || A function which is called at the end of this script's `onGameStart`. It takes no parameters. You could use this to spawn additional gears like girders or mines || |
|
35 || `extra_onGameInit` || A function which is called at the end of this script's `onGameInit` || |