Skyline Lua API  Version 1.0 RC1
Lua Script Reference for Skyline Game Engine.
LUA_API_Sky.h
Go to the documentation of this file.
1 // | _ ____ __ _
2 // | / \ _ _ _ __ __ _/ ___| ___ / _| |_
3 // | / _ \| | | | '__/ _` \___ \ / _ \| |_| __|
4 // | / ___ \ |_| | | | (_| |___) | (_) | _| |_
5 // | /_/ \_\__,_|_| \__,_|____/ \___/|_| \__|
6 // |
7 // | Aurasoft UK 2008 - 2016 http://www.aurasoft.co.uk
8 // |
9 // | Skyline Game Engine Lua API Documentation
10 // |
11 // | This file belongs to Aurasoft UK for the Skyline Game Engine of all versions.
12 // | This file is not for use in any other software that is not owned by Aurasoft UK and cannot be used by any other
13 // | person outside of the Skyline Game Engine development team.
14 // |
15 // | Copyright - Aurasoft UK & Skyline Game Engine 2008 - 2016
16 // |
17 
18 // SKYLINE LUA CLASS FOR API DOCUMENTATION
19 
27 class sky
28 {
29 public:
30 
56  void callGlobalFn(entityID, value);
57 
58 
81  void callModuleEvent(int callingID, int targetID, string key, string type, string value);
82 
83 
84 
106  void luaModuleOut(int objID, string key, string value, string optional_type);
107 
108 
109 
110 
125  void lprint(string text);
126 
127 
141  void trace();
142 
143 
167  void setGameState(int gameState);
168 
184  int getGameState();
185 
186 
202  void setVar(string variableName, string value);
203 
204 
218  string getVar(string var);
219 
220 
264  void setTable(string tableName, table);
265 
266 
310  string getTable(table);
311 
312 
325  void printTable(table);
326 
327 
340  float3 raycastToCursor(float posx, float posy, float posz);
341 
354  int getSceneScriptID();
355 
388  void print(String text, optional int singleLineState);
389 
408  void ui_changeInterface(String workspace, String MyUI);
409 
410 
422  void ui_clear();
423 
424 
437  void ui_setFontColor(|String color);
438 
439 
452  void loadScene(String sceneFileName);
453 
454 
474  void exitEnable(bool state);
475 
492  void exit();
493 
507  void getMouseDelta();
508 
530  void suppressErrors(int state);
531 
550  void include(String filename);
551 
561  void sky.getDir_GameAssets();
562 
572  void sky.getDir_GameRoot();
573 
583  void sky.luaModuleOut(obj, key, value, optional_type );
584 
594  void sky.callModuleEvent(callingID, targetID, key, type, value );
595 
603  void restartGame();
604 
612  int id = sky.getSelectedID();
613 
614 
623  int sceneScriptId = sky.getSceneId()
624 
625 
634  void sky.suppressErrors();
635 
636 
637 
638 
639 
640 
641 
642 
643 
644 
645 
646 
647 
648 };
void ui_clear()
Clears the simple console.
void restartGame()
restartGame(). restartGame() exit the game and restart the player for use with game player and end ga...
void ui_changeInterface(String workspace, String MyUI)
Prints the contents of the string text to the game overlay console.
int getGameState()
Call this function to return the current Game State. This function in the sky.library() is depreciate...
void getMouseDelta()
This function returns you the X and Y mouse move deltas calculated within the engine.
void include(String filename)
This will copy the contents of a lua script into the top of the current script inside lua...
void setVar(string variableName, string value)
This function is used when you require the service of a global variable. This variable will be availa...
int getSceneScriptID()
Returns the scene script ID.
void sky getDir_GameAssets()
return the compiled and ran game folder
string getVar(string var)
Receive the data stored in the global variable named var.
void printTable(table)
This function will print out to the console all of the table key:value Important: The table must cont...
string getTable(table)
Receive the data stored in the global table named table Important: The table must contain pairs of ke...
void sky getDir_GameRoot()
This will return the Root of the compiled game folder. Great for mods or save files.
void suppressErrors(int state)
Use this function as a performance helper. It stops all messages from being printed to the DOS Consol...
float3 raycastToCursor(float posx, float posy, float posz)
Cast a ray from the screen cursor to any object in 3D world space and return its position.
void loadScene(String sceneFileName)
Dynamically loads a scene.
void callGlobalFn(entityID, value)
Call this command to trigger all entities script globalFn() event.
void setTable(string tableName, table)
This function is used when you require the service of a global Table. This table will be available to...
void ui_setFontColor(|String color)
Sewts the font color for the simple console.
void setGameState(int gameState)
Call this function to change the current game state. This function in the sky.library() is depreciate...
void print(String text, optional int singleLineState)
Prints the contents of the string text to the game overlay console.
Definition: LUA_API_States.h:28
void lprint(string text)
Prints the content of the variable text to the console.
void trace()
A debugging function that will print a noticable line of text to the console. Very handy when followi...
void callModuleEvent(int callingID, int targetID, string key, string type, string value)
Call this command to send an event and data to a specified objects graph's "Lua Event" module...
void exitEnable(bool state)
Prevents the system from using the ESC key to close down the player.
Definition: LUA_API_Sky.h:27
int sceneScriptId
get scene script ID. getSceneId() gets the scene id for scnee script events scenes currently have a s...
Definition: LUA_API_Sky.h:623
void exit()
Exits the game.
void luaModuleOut(int objID, string key, string value, string optional_type)
Call this command to send data out of this lua module.