Community Function Library v1.4
zardOz2 - Custom level - Jul 27, 2014 from AndroidSo the way I understand it is we will be getting the ability to read functions from one lua to another. This will allow you to have one lua filled with your favorite functions and shortcuts so you dont need to clog up your working lua... Here's a few functions I made to get us started...
gyro(), spoke(), tilt(), DandA(),
grid(), poly(), field()
gyro(objectID#)
--this function lets you get gyroscope readings from any object by entering its ID# Ex: game:show_numfeed(gyro(3))
spoke(startX, startY, Angle, Length, Width, Red, Green, Blue, Alpha)
--This one is a draw_line function but exchanges the endX,endY for angle from start and line length. Ex: spoke(0,0,.125,5,.1, 1,1,0,2) will draw a line 5 long on a 45 degree angle(.125) with a yellow color beginning at world 0x,0y
Counterclock, Clock=tilt(ObjectID#, Sensitivity)
--get tiltmeter readings from any object by id
DandA(objectID1, objectID2, worldx1, worldy1, worldx2, worldy2)
--This finds the distance and angle between any two points, it can be two objects, one object and a world X/Y or two world points. World points can be used to measure any hypotenuse calculation you need as well.
grid(CenterX, CenterY, GridHeight, GridWidth, BoxSize, LineWidth, DrawDepth, Red, Green, Blue, Alpha)
--draw a grid of a specific size, color and depth
poly(CenterX, CenterY, Radius, #ofSides, Angle, LineWidth, Depth, Red, Green, Blue, Alpha)
--draw a line polygon
field(ObjectID#, FreqToSendTickTo)
--Object Cursor Field, Sends tick to the desired frequency if the target object is touched.
See code for details, I look forward to including other peoples helpful functions in my library.
Downloads: 238 - Level ID: 9265