loading...
Join the ludiloom Public Alpha Test and help us change the game-making game...
Ludiloom API
last updated on 2009, May 22nd
| Base Concepts | Scene Objects | Data Interface | Gui Overlays | |||
|
Arena Object ObjectTemplate Presence PresenceTemplate RuleBook System |
BillBoard Camera Effect HighlightDecal Light Material MeshDecal |
Model Plane River Road Sound StaticFlora Terrain |
HashTable InterModel Matrix MediaItem Vector |
Button Checkbox CodeEditbox ComboBox Editbox Listbox MenuBar MenuItem |
MenuPopup MultiColumn MultilineEditbox ProgressBar RadioButton ScrollBar ScrollPane SliderBar |
Spinner StaticImage StaticText TabPane ToggleButton Tree Window |
Matrix
print
nil print ()
Impementation of matrices data structure in lua. They are created in the Arena object.
Matrices are persistent so they are always saved in the server and loaded when the arena is loaded.
| Method Summary | |
number | getDataType () |
number, number | getSize () |
<type> | getValue (number x, number y) |
nil | print () |
nil | setValue (number x, number y, <type> value) |
| Method Detail |
getDataType
number getDataType ()- Returns the code of the data type of the elements in the Matrix:
1- number,
2- bool,
3- string,
4- object key,
5- media item key,
6- representation key,
7- material - Returns:
number- The code of the data type of the elements in the Matrix.
getSize
number, number getSize ()- Returns the size of the Matrix (x,y).
- Returns:
number- X size of the Matrix.number- Y size of the Matrix.
getValue
<type> getValue (number x, number y)- Returns the element in the position x,y.
- Parameters:
number x- X index of the element to return. Positions are counted from 1.number y- Y index of the element to return. Positions are counted from 1.
- Returns:
<type>- Eelement in the position x,y of the Matrix.
- Prints the Matrix data and attributes to the console.
setValue
nil setValue (number x, number y, <type> value)- Sets an element in the Matrix.
- Parameters:
number x- X index of the element to be replaced. Positions are counted from 1.number y- Y index of the element to be replaced. Positions are counted from 1.<type> value- Element to set in the position x,y. Must be of the same type as the Matrix.

