383 Now, when such a special point at the coordinates `x` and `y` with an assigned value of `flags` is added, this function is called. `flags` is a whole number between `0` and `255` inclusive. |
383 Now, when such a special point at the coordinates `x` and `y` with an assigned value of `flags` is added, this function is called. `flags` is a whole number between `0` and `255` inclusive. |
384 |
384 |
385 This function is used in Racer and !TechRacer to define waypoints. |
385 This function is used in Racer and !TechRacer to define waypoints. |
386 |
386 |
387 === `onAchievementsDeclaration()` === |
387 === `onAchievementsDeclaration()` === |
388 This function is called after the stats have been built. You are supposed to call `DeclareAchivement` here. |
388 This function is called after the stats have been built. You are supposed to call `DeclareAchievement` here. |
389 |
389 |
390 == Functions for creating gears == |
390 == Functions for creating gears == |
391 |
391 |
392 === <tt>!AddGear(x, y, gearType, state, dx, dy, timer)</tt> === |
392 === <tt>!AddGear(x, y, gearType, state, dx, dy, timer)</tt> === |
393 This creates a new gear at position x,y (measured from top left) of kind `gearType` (see [GearTypes Gear Types]). The initial velocities are `dx` and `dy`. All arguments are numbers. The function returns the `uid` of the gear created. Gears can have multple states at once: `state` is a bitmask, the flag variables can be found in [States]. |
393 This creates a new gear at position x,y (measured from top left) of kind `gearType` (see [GearTypes Gear Types]). The initial velocities are `dx` and `dy`. All arguments are numbers. The function returns the `uid` of the gear created. Gears can have multple states at once: `state` is a bitmask, the flag variables can be found in [States]. |
1428 Converts the whole numbers `x` and `y` to strings and writes them to `Logs/game0.log`, one line each. |
1428 Converts the whole numbers `x` and `y` to strings and writes them to `Logs/game0.log`, one line each. |
1429 |
1429 |
1430 === `StartGhostPoints(count)` === |
1430 === `StartGhostPoints(count)` === |
1431 Just prints out “GHOST_POINTS” and the argument on the console. This function might change in later versions. |
1431 Just prints out “GHOST_POINTS” and the argument on the console. This function might change in later versions. |
1432 |
1432 |
1433 === `DeclareAchivement(id, teamname, location, value)` === |
1433 === `DeclareAchievement(id, teamname, location, value)` === |
1434 Declares an achievement with the identifier `id` achieved by the team `teamname` on the map `location` with an achievement value (e.g. score) of `value`. `value` must be an integer. You are supposed to call this function inside an `onAchievementsDeclaration` callback. |
1434 Declares an achievement with the identifier `id` achieved by the team `teamname` on the map `location` with an achievement value (e.g. score) of `value`. `value` must be an integer. You are supposed to call this function inside an `onAchievementsDeclaration` callback. |
1435 |
1435 |
1436 Currently, this actually just triggers a console output, but it might be changed later. The idea is to track multiplayer records. |
1436 Currently, this actually just triggers a console output, but it might be changed later. The idea is to track multiplayer records. |
1437 |
1437 |
1438 Example: |
1438 Example: |