Skyline Lua API  Version 1.0
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 - 2018 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 - 2018
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 
469  void loadSceneByTag(String sceneTagName);
470 
490  void exitEnable(bool state);
491 
508  void exit();
509 
523  void getMouseDelta();
524 
546  void suppressErrors(int state);
547 
566  void include(String filename);
567 
577  void sky.getDir_GameAssets();
578 
588  void sky.getDir_GameRoot();
589 
599  void sky.luaModuleOut(obj, key, value, optional_type );
600 
610  void sky.callModuleEvent(callingID, targetID, key, type, value );
611 
619  void restartGame();
620 
628  int id = sky.getSelectedID();
629 
630 
639  int sceneScriptId = sky.getSceneId()
640 
641 
650  void sky.suppressErrors();
651 
652 
653 
654 
655 
656 
657 
658 
659 
660 
661 
662 
663 
664 };
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:639
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.
void loadSceneByTag(String sceneTagName)
Dynamically loads a scene through the use of a scene tag name.