Pipecannon.lua

From Moondust Wiki
Revision as of 23:46, 21 December 2015 by Enjl (talk | contribs)
Jump to navigation Jump to search

Download latest version

A library which lets you create pipe cannons.


Documentation

This API stores all warps in your level in a table and lets you customise them using the fields below:

angle Define angle in which the player should be shot. 0 shoots him upwards, goes clockwise.
exitspeed Sets speed at which the player will get launched. When set to 0, the warp behaves like normal.
SFX Set sound effect for exiting the warp.
effect Set effect for exiting the warp.

The fields angle and exitspeed can be defined for each warp individually.

Example

local pipecannon = loadAPI("pipecannon");
pipecannon.exitspeed = {10, 20, 15, 30} --sets exitspeeds for warps 1-4

pipecannon.angle[3] = 60 --player is shot at a 60° angle when exiting warp 3

pipeAPI.SFX = 22 -- default value (bullet bill sfx), set to 0 for silent
pipeAPI.effect = 63 -- set to 0 for none