User Tools

Site Tools


hpl1:documentation:script_reference

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
hpl1:documentation:script_reference [2018/05/06 16:59]
abion47 [Audio]
hpl1:documentation:script_reference [2018/05/06 17:05] (current)
abion47 [Physics]
Line 319: Line 319:
 asJointName The joint name\\ ​ asJointName The joint name\\ ​
 asType The type, can be: "​OnMax"​ or "​OnMin"​.\\ ​ asType The type, can be: "​OnMax"​ or "​OnMin"​.\\ ​
-asFunc The script function to be called. Must be in the current script file. _fckg_QUOT__fckg_QUOT_ = disabled.\\ ​+asFunc The script function to be called. Must be in the current script file. %%_fckg_QUOT__fckg_QUOT_ = disabled.%%\\ 
 \\  \\ 
 ''​void BreakJoint(std::​string asJointName)'' ​ ''​void BreakJoint(std::​string asJointName)'' ​
Line 400: Line 400:
 \\  \\ 
 \\  \\ 
-==== Local Variables ==== ''​void CreateLocalVar(std::​string asName, int alVal)'' ​+ 
 +==== Local Variables ====  
 + 
 +''​void CreateLocalVar(std::​string asName, int alVal)'' ​
 ''​void SetLocalVar(std::​string asName, int alVal)'' ​ ''​void SetLocalVar(std::​string asName, int alVal)'' ​
 ''​void AddLocalVar(std::​string asName, int alVal)'' ​ ''​void AddLocalVar(std::​string asName, int alVal)'' ​
Line 406: Line 409:
 \\  \\ 
 \\  \\ 
-==== Global Variables ==== ''​void ​ CreateGlobalVar(std::​string asName, int alVal)'' ​+ 
 +==== Global Variables ====  
 + 
 +''​void ​ CreateGlobalVar(std::​string asName, int alVal)'' ​
 ''​void SetGlobalVar(std::​string asName, int alVal)'' ​ ''​void SetGlobalVar(std::​string asName, int alVal)'' ​
 ''​void AddGlobalVar(std::​string asName, int alVal)'' ​ ''​void AddGlobalVar(std::​string asName, int alVal)'' ​
Line 413: Line 419:
 \\  \\ 
 \\  \\ 
-===== Game scripts =====   ==== General ==== ''​void ResetGame();'' ​+ 
 +===== Game scripts =====    
 + 
 +==== General ====  
 + 
 +''​void ResetGame();'' ​
 Resets the game and returns to main menu\\ ​ Resets the game and returns to main menu\\ ​
 \\  \\ 
Line 454: Line 465:
 abX enable or disabled the function.\\ ​ abX enable or disabled the function.\\ ​
 \\  \\ 
-''​void AddRadioMessage( std::​string asTransCat,​std::​string asTransName, ​  std::string asSound);'' ​+''​void AddRadioMessage( std::​string asTransCat,​std::​string asTransName,​ std::string asSound);'' ​
 Plays an audio file and displays subtitles for it.\\  Plays an audio file and displays subtitles for it.\\ 
 asTransCat the Category in the translations file\\ ​ asTransCat the Category in the translations file\\ ​
Line 573: Line 584:
 \\  \\ 
 \\  \\ 
-==== Attacks ==== ''​void CreateSplashDamage(std::​string asAreaName, float afRadius, float afMinDamage,​ float afMaxDamge, ​  float afMinForce, float afMaxForce, float afMaxImpulse,​ int alStrength);'' ​+ 
 +==== Attacks ====  
 + 
 +''​void CreateSplashDamage(std::​string asAreaName, float afRadius, float afMinDamage,​ float afMaxDamge, ​  float afMinForce, float afMaxForce, float afMaxImpulse,​ int alStrength);'' ​
 Creates a ball shaped splash damage at the center of an area.\\ ​ Creates a ball shaped splash damage at the center of an area.\\ ​
 asAreaName Name of the area.\\ ​ asAreaName Name of the area.\\ ​
Line 602: Line 616:
 \\  \\ 
 \\  \\ 
-==== Game Timer ==== ''​void CreateTimer(std::​string asName, float afTime, std::string asCallback, bool abGlobal);'' ​+ 
 +==== Game Timer ====  
 + 
 +''​void CreateTimer(std::​string asName, float afTime, std::string asCallback, bool abGlobal);'' ​
 Creates a new timer which calls a callback function when the time is out.\\ ​ Creates a new timer which calls a callback function when the time is out.\\ ​
 Syntax: **MyCallback(string asTimerName)**,​ the prefix "​@"​ (ie "​@Func()"​) shows that the function is in the global script\\ ​ Syntax: **MyCallback(string asTimerName)**,​ the prefix "​@"​ (ie "​@Func()"​) shows that the function is in the global script\\ ​
Line 617: Line 634:
 \\  \\ 
 \\  \\ 
-==== Player ==== ''​static void GivePlayerDamage(float afAmount, ​ std::string asType);'' ​+ 
 +==== Player ==== 
 + 
 + ''​static void GivePlayerDamage(float afAmount, ​ std::string asType);'' ​
 Gives the player a hit + damage\\ ​ Gives the player a hit + damage\\ ​
 afAmount The amount of health taken.\\ ​ afAmount The amount of health taken.\\ ​
Line 669: Line 689:
 \\  \\ 
 \\  \\ 
-==== Inventory ==== ''​void AddPickupCallback(std::​string asItem, std::string asFunction);'' ​+ 
 +==== Inventory ====  
 + 
 +''​void AddPickupCallback(std::​string asItem, std::string asFunction);'' ​
 Add a callback that is called when the player picks up an item.\\ ​ Add a callback that is called when the player picks up an item.\\ ​
 The syntax for the callback function is:\\  The syntax for the callback function is:\\ 
Line 721: Line 744:
 asTransName The name of the entry in the lang file.\\ ​ asTransName The name of the entry in the lang file.\\ ​
 \\  \\ 
-\\  +\\ 
-==== Map / Level Properties ==== ''​SetAmbientColor(float r, float g, float b);'' ​+  
 +==== Map / Level Properties ====  
 + 
 +''​SetAmbientColor(float r, float g, float b);'' ​
 Sets the ambient color of the level, this should always be part of a level as it gives it a bit of light otherwise shadows will be pitch black.\\ ​ Sets the ambient color of the level, this should always be part of a level as it gives it a bit of light otherwise shadows will be pitch black.\\ ​
 \\  \\ 
Line 777: Line 803:
 \\  \\ 
 \\  \\ 
-==== Game Entity Properties ==== ''​void SetGameEntityActive(std::​string asName, bool abX);'' ​+ 
 +==== Game Entity Properties ====  
 + 
 +''​void SetGameEntityActive(std::​string asName, bool abX);'' ​
 Set if a game entity is active.\\ ​ Set if a game entity is active.\\ ​
 asName The name of the game entity\\ ​ asName The name of the game entity\\ ​
Line 1078: Line 1107:
 \\  \\ 
 \\  \\ 
-==== Game Entity Callbacks ==== ''​void AddEntityCollideCallback(std::​string asType, std::string asDestName, ​  ​std::​string asEntityName,​ std::string asFuncName);'' ​+ 
 +==== Game Entity Callbacks ====  
 + 
 +''​void AddEntityCollideCallback(std::​string asType, std::string asDestName, ​  ​std::​string asEntityName,​ std::string asFuncName);'' ​
 Add a collide callback to an entity.\\ ​ Add a collide callback to an entity.\\ ​
 The syntax for the callback function is:\\  The syntax for the callback function is:\\ 
hpl1/documentation/script_reference.txt · Last modified: 2018/05/06 17:05 by abion47