joobt-Lumod icon

Lumod

Another Lua mod. Unfinished!

By joobt
Last updated 3 days ago
Total downloads 220
Total rating 0 
Categories Utility Mods Code Mods Misc
Dependency string joobt-Lumod-1.1.0
Dependants 1 other package depends on this package

This mod requires the following mods to function

bonelib-BoneLib-3.2.2 icon
bonelib-BoneLib

A BONELAB mod for making life easier for other mod creators.

Preferred version: 3.2.2

README

Lumod (Lua Mod (Lmao))

Another Lua framework mod. Quite unfinished and very sloppy
Comes pre-packaged with an example LiDAR script.

RIGHT MENU + RIGHT A + LEFT MENU to reload lua
If on flatplayer, press L to reload lua.
The mod also forces the BoneMenu onto the UI layer. (doesnt cause any issues afaik)
This is because the LiDAR script example kinda sucked to turn off because the menu was hidden

Changelog

1.1.0 - controller bind for lua & bugfix
1.0.0 - release



Simple function list:

print("does what you think") -- Output: "[\file.lua] Hi guys."
error("This ones older and less supported")
warn("This ones older and less supported")

R = raycast(origin, direction, length)

R["obj"] -- Object
R["normal"]
R["distance"]
R["point"] -- Hitpos
R["layer"] -- The layer ID it hit

onUpdate(function()
    print("Runs every frame")
end)

onKeyDown(function(keyname)
    print("Runs every keypress, key name is:" .. keyname)
end)

onSceneWasLoaded(function(sceneName)
    print("Runs on ".. sceneName .." load")
end)

notify(msg,title,type,duration)

time() -- Current unix timestamp (MILLISECONDS)

filepath("file") -- returns <melonloader data folder>/file

vec(n,n,n) -- a vector

CONSTS:
    _NOTIFY_SUCCESS
    _NOTIFY_ERROR
    _NOTIFY_INFO
    _NOTIFY_WARNING

-- Adds a button to your script's bonemenu menu
(void) page.CreateFunction(name, (vec)color, (func)callback)

(Object) debug.DrawLine((vec)from, (vec)to, (vec)color, alpha?, startwidth?, endwidth?)

(Object) debug.DrawSphere(vec pos, vec size, vec color, float alpha = 1)

theres "input.*" and "player.*" but i really dont have the energy to type more.
Objects have basic properties
I dont have the energy go look at Analysis