Lineguide.lua
This library adds all the Line Guides from SMW to SMBX, with full support for layer movement/showing/hiding. It also allows the user to attach any NPC to a Line Guide like in Super Mario Maker.
Requires the Colliders library.
Installation
This API is currently unavailable to the public. Expect a release post on SMBX.org soon...
Variables
These are variables the user can access and set. They are all part of the lineguide namespace, so you must put "lineguide." before each.
General
| Name | Type | Description |
|---|---|---|
| debug | bool | Set to true for debug mode, which will display the various collider objects used in this API. |
| properties | table of properties | Contains the properties of the NPCs that have been configured to connect to lines. See the section labelled "Properties" for more information. |
| lineNpcs | table of IDs | Contains the IDs of all NPCs that will attach to Line Guides. NPCs that are platforms in vanilla SMBX need not be added by the user. |
Line BGO IDs
These variables contain the IDs of the BGOs that are being used as Line Guides. Since these values are loaded in initialization, setting them anywhere other than in the top of your Luna.lua file will have no effect. DO NOT use vanilla SMBX Line Guides anywhere in a level where this API is used, as they will interfere with this API's functionality, not to mention that they will behave very strangely. Any BGO can be used, provided it has the right dimensions (You can use bgofix.lua to change the dimensions of any BGO!) and it is not a vanilla Line Guide.
Properties
These variables contain the properties of the NPCs which control their behavior relating to this API. They are accessed using the format "properties[ID].PROPERTY." For example, to access the "lineSpeed" property of the SMB3 Goomba, you would use:
lineguide.properties[1].lineSpeed
| Name | Type | Default | Description |
|---|---|---|---|
| lineSpeed | double | 2 | The speed, in pixels per second, at which the NPC travels on a line. |
| jumpSpeed | double | 4 | The speed, in pixels per second, at which the NPC moves when it "jumps" off the end of a line. This only applies if there is any upward movement when the end of the line is reached. |
Notes/Issues
- When placing Line Guides in a level, the grid should be 16x16. The background-* txts provided in the graphics download will give these BGOs a 16x16 grid in the PGE editor.
- Vanilla Line Guides will not work with this API. They interfere with platform movement, and they behave strangely when this API is loaded. It is best to avoid using them altogether in a level that uses this API.
- NPCs created by NPC spawners will not connect to Line Guides. Since spawners are commonly used to create new platforms on lines, a future update will include a workaround for this issue.



