LuaAPI: Add onSpecialPoints. I hope it's more or less correct
authorWuzzy
Tue, 20 Feb 2018 12:59:04 +0000
changeset 1223 868b783afc88
parent 1222 111d15f81dbd
child 1224 90c14fae29f2
LuaAPI: Add onSpecialPoints. I hope it's more or less correct
LuaAPI.wiki
--- a/LuaAPI.wiki	Tue Feb 20 12:25:33 2018 +0000
+++ b/LuaAPI.wiki	Tue Feb 20 12:59:04 2018 +0000
@@ -378,6 +378,12 @@
 
 `frameIdx` is used for the rubber orientation. The possible values are explained in `PlaceRubber`. `centerX` and `centerY` are the coordinates of the rubber’s center.
 
+=== `onSpecialPoint(x, y, flags)` ===
+This is used while a special hand-drawn map is loaded. The engine is building these hand-drawn maps by reading points from the map definition. Optionally, some of these points may be “special”. These are not actually drawn on the map, but are used to store additional information for a position on the map. Special points currently need to be added manually in the map, the in-game editor is not able to add those yet (as of 0.9.23).
+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.
+
+This function is used in Racer and !TechRacer to define waypoints.
+
 == Functions for creating gears ==
 
 === <tt>!AddGear(x, y, gearType, state, dx, dy, timer)</tt> ===