430 time = 180000, |
430 time = 180000, |
431 shootText = loc("You have thrown %d cluster bombs."), |
431 shootText = loc("You have thrown %d cluster bombs."), |
432 } |
432 } |
433 |
433 |
434 TargetPracticeMission(params)</code> |
434 TargetPracticeMission(params)</code> |
|
435 |
|
436 = !SpeedShoppa = |
|
437 Starting with 0.9.22, this library provides a function to create a simple shoppa-style mission. |
|
438 |
|
439 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. |
|
440 |
|
441 This library also loads the Locale library for its own purposes. If you use !SpeedShoppa, you do not have to explicitly load Locale anymore. |
|
442 |
|
443 === `SpeedShoppaMission(params)` === |
|
444 This function sets up the *entire* mission and needs one argument: `params`. |
|
445 The argument “`params`” is a table containing fields which describe the training mission. |
|
446 |
|
447 Mandatory fields: |
|
448 |
|
449 || *Field name* || *Description* || |
|
450 || `map` || The name of the map to be used || |
|
451 || `theme` || The name of the theme (does not need to be a standalone theme) || |
|
452 || `time` || The time limit in milliseconds || |
|
453 || `crates` || The coordinates of where the crates will be spawned. It is a table containing tables containing coordinates of format `{ x=value, y=value }`. Example: `crates = { { x = 324, y = 43 }, { x = 123, y = 56 }, { x = 6, y = 0 }, }`. There must be at least 1 crate. || |
|
454 |
|
455 Optional fields: |
|
456 |
|
457 || *Field name* || *Description* || |
|
458 || `missionTitle` || The name of the mission (optional but highly recommended) (default: `"Speed Shoppa"`) || |
|
459 || `hogHat` || Hat of the hedgehog (default: `"NoHat"`) || |
|
460 || `hogName` || Name of the hedgehog (default: `"Roper"`) || |
|
461 || `teamName` || Name of the hedgehog’s team (default: `"Shoppers"`) || |
|
462 || `teamGrave` || Name of the hedgehog’s grave (default: `"Statue"`) || |
|
463 || `teamFlag` || Name of the team’s flag (default: `"cm_shoppa"`) || |
|
464 || `clanColor` || Color of the (only) clan (default: `0xFF0204`, which is a red tone) || |
|
465 || `goalText` || A short string explaining the goal of the mission (default: `"Use your rope to collect all crates as fast as possible."`) || |
|
466 || `faceLeft` || If `true`, the hog faces to the left initially, if false, it faces to the right. (default: `false` (=right)) || |
|
467 || `crateType` || Specify the type of crate (this has no gameplay effect), pick one of `"ammo"`, `"utility"`, `"health"`. Default: `"ammo"` || |
|
468 || `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 || |
|
469 || `extra_onGameInit` || A function which is called at the end of this script's `onGameInit` || |