Colliders.lua

Download Latest Version

Previous Version (2.0.1)

Colliders is a library that helps manage custom collisions in LunaLua, making custom behaviour much easier!

It supports native collisions between players, NPCs and animations, as well as custom Box and Circle colliders to be constructed.

As of version 2.1.0, this library requires VectR.lua (included in the download).

As of version 2.1.6, this library also requires expandedDefines.lua which is only included in SMBX2.

Installation
Place the file colliders.lua into the LuaScriptsLib folder.

If you do not already have vectR.lua, also place that file into the same folder.

How to use
To enable the Colliders library for a specific level, add this line to luna.lua: This will load the Colliders API.

Example
This will kill any NPC that touches the player (but may not stop them from killing the player too!)

The following is an example of creation of every kind of primitive collider:

This will create and draw 5 collider objects inside the level, and should look like this:



Values
These are variables you can access

Classes
These are classes contained within this library

Vector (REMOVED AS OF 2.1.0. USE VECTR.LUA INSTEAD)
Values

Functions

Point
Values

Functions

Box
Values

Functions

Circle
Values

Functions

Tri
Values

Functions

Poly
Values

Functions

External Use Functions
These are functions you will need to use the library