Alienhead Posted yesterday at 01:34 AM Posted yesterday at 01:34 AM About This File Version 1.0 - Released This is a collection of utilities functions I have wrote and or accumulated over the past year and half. A great collection to get you started! How to use: ** Place the LUA file into the Source directory of your project. ** At the top of your main.lua entry file add this line of code: ** require("UltraUtilities") ** Then, any where in your code or components code - you can call any of the functions. ** Example usage: ** Local Sun = GetSunEntity() ** Sun:SetColor(255,0,255,255) Version 1.0 includes: function GetSunEntity() -- Get the directional light ( sun ) from the map file function GetTerrainEntity() -- get the terrain handle from the map file function RandomFloat(lower, greater) -- pseudo random float function CubicInterpolate(x0, x1, x2, x3, mu) -- cubic interpolation function Mysplit(inputstr, sep) -- split a string into chunks based off a separator - returns a table with the chunks in it function Note(str) -- easier Notify() command, takes numbers and strings and is shorter to type function HasTag(ent, tag) -- checks if a tag is available for an actor function HasPartialTag(ent, ptag) -- returns everything AFTER ':' part of the tag function YnFileExists(filename) -- check if a file exists function IsMouseOverPosition(x1, x2, y1, y2) -- mouse over a position -- good for gui's function MyRandom(min, max, float) -- Generate a random number with options ( float of int) function Secure_Seed() -- uses hardware ID's to generate a TRUELY random number in lua function CopyToClipboard(text) -- copy a string to the clipboard function LerpToZero(value, factor) -- slowly move a number to zero function DampToZero(value, smoothing, delta) -- slowly move a number to zero based off millisecs() Stary tuned more to come ! Language : Lua 1 Alienhead Components and Software
Recommended Posts