author | Wuzzy |
Wed, 02 May 2018 22:54:25 +0100 | |
changeset 1351 | 81ec32569680 |
parent 1342 | 354a30929695 |
child 1377 | fecee71744b3 |
permissions | -rw-r--r-- |
1342 | 1 |
#summary Lua library documentation for !SpeedShoppa |
1351 | 2 |
#labels !LuaLibrary |
1329
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
3 |
= Lua library: `SpeedShoppa` = |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
4 |
Starting with 0.9.22, this Lua library provides a function to create a simple shoppa-style mission. |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
5 |
|
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
6 |
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. |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
7 |
|
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
8 |
== `SpeedShoppaMission(params)` == |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
9 |
This function sets up the *entire* mission and needs one argument: `params`. |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
10 |
The argument “`params`” is a table containing fields which describe the training mission. |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
11 |
|
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
12 |
Mandatory fields: |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
13 |
|
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
14 |
|| *Field name* || *Description* || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
15 |
|| `map` || The name of the map to be used || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
16 |
|| `theme` || The name of the theme (does not need to be a standalone theme) || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
17 |
|| `time` || The time limit in milliseconds || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
18 |
|| `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. || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
19 |
|
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
20 |
Optional fields: |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
21 |
|
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
22 |
|| *Field name* || *Description* || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
23 |
|| `missionTitle` || The name of the mission (optional but highly recommended) (default: `"Speed Shoppa"`) || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
24 |
|| `hogHat` || Hat of the hedgehog (default: `"NoHat"`) || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
25 |
|| `hogName` || Name of the hedgehog (default: `"Roper"`) || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
26 |
|| `teamName` || Name of the hedgehog’s team (default: `"Shoppers"`) || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
27 |
|| `teamGrave` || Name of the hedgehog’s grave (default: `"Statue"`) || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
28 |
|| `teamFlag` || Name of the team’s flag (default: `"cm_shoppa"`) || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
29 |
|| `clanColor` || Color of the (only) clan (default: `0xFF0204`, which is a red tone) || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
30 |
|| `goalText` || A short string explaining the goal of the mission (default: `"Use your rope to collect all crates as fast as possible."`) || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
31 |
|| `faceLeft` || If `true`, the hog faces to the left initially, if false, it faces to the right. (default: `false` (=right)) || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
32 |
|| `crateType` || Specify the type of crate (this has no gameplay effect), pick one of `"ammo"`, `"utility"`, `"health"`. Default: `"ammo"` || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
33 |
|| `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 || |
bd781e19a52d
Split Lua libraries into several sub-pages
Wuzzy <almikes@aol.com>
parents:
diff
changeset
|
34 |
|| `extra_onGameInit` || A function which is called at the end of this script's `onGameInit` || |