LookOut.lua
Revision as of 07:22, 16 May 2017 by Yoshi021 (talk | contribs) (Created page with "Category:LunaLua helper libraries [https://cdn.discordapp.com/attachments/281202928495230976/313888249015959553/lookOut.zip Download lookOut.lua] A small API that will le...")
A small API that will let you pan in the level and look around what is outside the camera.
Installation
Place the file lookOut.lua into the LuaScriptsLib folder.
How to Use
To enable the click.lua, add this line to lunadll.lua:
local lookOut= API.load("lookOut");
This will load the API.
Examples
local lookOut = API.load("lookOut")
local inputs2 = API.load("inputs2")
function onTick()
if inputs2.state[1].up == inputs2.PRESS then
lookOut.activate()
end
end
Documentation
Values
| Value | Default | Description |
|---|---|---|
| speed | 5 | The speed the of the camera when it is moving. |
| useCursor | true | Should the cursor be used to move the camera? |
| useArrows | true | Sould the arrow keys be used to move the camera? |
| endCursor | true | Should making a click with the cursor end the animation? |
| endPause | true | Should pressing the 'pause' key end the animation? |
| border | 50 | The number of pixels the cursor be at the edge to move the camera when useCursor is true. |
| endAnimation | true | Should there be an ending animation when the animation ends. |
| draw | true | Should the default arrows be drawn? |
Functions
| Function | Description |
|---|---|
| activate(x,y) | To activate the animation. Has optional x and y parameters. The animation will start at the x-scene and y-scene coordinates, otherwise it will use the player's camera. |
| deactivate() | Will end the animation. If endAnimation is true, then an ending animation will start. |
| isActivated() | Will return a bool defining if the animation is currently activated. This does not account for the ending animation. |
| isEnding() | Will return a bool defining if the end animation is currently activated. This does not account for the normal animation. |