User Tools

Site Tools


hpl1:documentation:script_reference

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
hpl1:documentation:script_reference [2020/02/08 21:09]
muffin old revision restored (2010/11/04 06:50) don't fucking touch this shit, it was properly structued before.
hpl1:documentation:script_reference [2020/02/08 21:17]
muffin this wiki sucks..
Line 171: Line 171:
 afOnMinLength Minimum time before going from off to on.\\ afOnMinLength Minimum time before going from off to on.\\
 afOnMaxLength Maximum time before going from off to on.\\ afOnMaxLength Maximum time before going from off to on.\\
-asOnSound Name of the sound played when going from off to on. _ckgedit_QUOT__ckgedit____> means no sound.\\ +asOnSound Name of the sound played when going from off to on. _ckgedit_QUOT__ckgedit> means no sound.\\ 
-asOnPS Name of the particle system played when going from off to on. _ckgedit_____QUOT__ckgedit> means none.\\+asOnPS Name of the particle system played when going from off to on. _ckgedit_QUOT__ckgedit> means none.\\
 afOffMinLength Minimum time before going from on to off.\\ afOffMinLength Minimum time before going from on to off.\\
 afOffMaxLength Maximum time before going from on to off.\\ afOffMaxLength Maximum time before going from on to off.\\
-asOffSound Name of the sound played when going from on to off. _ckgedit_QUOT__ckgedit____> means no sound.\\ +asOffSound Name of the sound played when going from on to off. _ckgedit_QUOT__ckgedit> means no sound.\\ 
-asOffPS Name of the particle system played when going from on to off. _ckgedit_____QUOT__ckgedit> means none.\\+asOffPS Name of the particle system played when going from on to off. _ckgedit_QUOT__ckgedit> means none.\\
 abFade If there should be a fade between off and on.\\ abFade If there should be a fade between off and on.\\
 afOnFadeLength Fade length from off to on.\\ afOnFadeLength Fade length from off to on.\\
Line 297: Line 297:
 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. _ckgedit_QUOT__ckgedit____>​ = disabled.__ \\+asFunc The script function to be called. Must be in the current script file. _ckgedit_QUOT__ckgedit____>​ = disabled.\\
 \\ \\
 ''​void BreakJoint(std::​string asJointName) '' ​  ​Breaks a joint.\\ ''​void BreakJoint(std::​string asJointName) '' ​  ​Breaks a joint.\\
Line 413: Line 413:
 \\ \\
 VARIOUS TEMP STRINGS\\ VARIOUS TEMP STRINGS\\
-''​void AddToTempString(std::​string asString); //A piece of text to add to a string void AddToTempStringTrans(std::​string asCat,​std::​string asEntry); // A text from the translations file in Category from Entry void AddToTempStringAction(string);​ //Get user configured key for a certain action void AddMessageTempString();​ // Add the strings to one temporary string to print as a Message on screen void AddSubTitleTempString(float);​ //Add the strings to one temporary string to print as a Subtitle on screen //''​ //   Used to create a flow of text that uses various sources, as an example from episode 1: ''​AddToTempStringTrans(GESHI_QUOT00_01_boat_cabinGESHI_QUOTGESHI_QUOTPadLock01GESHI_QUOT); AddToTempStringAction(GESHI_QUOTInventoryGESHI_QUOT); AddToTempStringTrans(GESHI_QUOTMiscGESHI_QUOTGESHI_QUOTParentDotGESHI_QUOT); AddMessageTempString();​ '' ​  Wrote the message "​Always travel with a padlock. And a key, preferably. Mine's in the inventory (TAB)."​ as a message.\\+''​void AddToTempString(std::​string asString); //A piece of text to add to a string void AddToTempStringTrans(std::​string asCat,​std::​string asEntry); // A text from the translations file in Category from Entry void AddToTempStringAction(string);​ //Get user configured key for a certain action void AddMessageTempString();​ // Add the strings to one temporary string to print as a Message on screen void AddSubTitleTempString(float);​ //Add the strings to one temporary string to print as a Subtitle on screen //''​ //   Used to create a flow of text that uses various sources, as an example from episode 1: ''​AddToTempStringTrans(__GESHI_QUOT__00_01_boat_cabin__GESHI_QUOT____GESHI_QUOT__PadLock01__GESHI_QUOT__); AddToTempStringAction(__GESHI_QUOT__Inventory__GESHI_QUOT__); AddToTempStringTrans(__GESHI_QUOT__Misc__GESHI_QUOT____GESHI_QUOT__ParentDot__GESHI_QUOT__); AddMessageTempString();​ '' ​  Wrote the message "​Always travel with a padlock. And a key, preferably. Mine's in the inventory (TAB)."​ as a message.\\
 \\ \\
-''​static void stdcall ​ChangeMap(std::​string asMapFile, std::string asMapPos, std::string asStartSound,​ std::string asStopSound,​ float afFadeOutTime,​ float afFadeInTime,​ std::string asLoadTextCat,​ std::string asLoadTextEntry);​ '' ​  ​Changes the map.\\+''​static void __stdcall ​ChangeMap(std::​string asMapFile, std::string asMapPos, std::string asStartSound,​ std::string asStopSound,​ float afFadeOutTime,​ float afFadeInTime,​ std::string asLoadTextCat,​ std::string asLoadTextEntry); ​__''​__   Changes the map.\\
 asMapFile The file to be loaded\\ asMapFile The file to be loaded\\
 asMapPos The position on the map to be spawned on.\\ asMapPos The position on the map to be spawned on.\\
Line 495: Line 495:
 afFadeOutTime How fast the shake should fade out.\\ afFadeOutTime How fast the shake should fade out.\\
 \\ \\
-''​SetupSaveArea(std::​string asName,​std::​string asMessageCat,​std::​string asMessageEntry,​ std::string asSound); '' ​  ​Properties for an area to type "​save",​ eg _ckgedit_QUOTarea_save_gamename". asName the name of the area\\+''​SetupSaveArea(std::​string asName,​std::​string asMessageCat,​std::​string asMessageEntry,​ std::string asSound); '' ​  ​Properties for an area to type "​save",​ eg _ckgedit_____QUOT__area_save_gamename". asName the name of the area\\
 asMessageCat The message category in lang file\\ asMessageCat The message category in lang file\\
 asMessageEntry The message entry in lang file\\ asMessageEntry The message entry in lang file\\
Line 511: Line 511:
 alStrength The strength of the the damage.\\ alStrength The strength of the the damage.\\
 \\ \\
-''​void SetupDamageArea( string asName, float afDamage, float afUpdatesPerSec,​ int alStrength, bool abDisableObjects,​ bool abDisableEnemies,​ string asDamageType,​ string asDamageSound);​ '' ​  ​Properties for an area of type "​damage",​ eg _ckgedit_QUOTarea_damage_gamename". Will inflict damage on player and entites while in it.\\+''​void SetupDamageArea( string asName, float afDamage, float afUpdatesPerSec,​ int alStrength, bool abDisableObjects,​ bool abDisableEnemies,​ string asDamageType,​ string asDamageSound);​ '' ​  ​Properties for an area of type "​damage",​ eg _ckgedit_QUOT__area_damage_gamename". Will inflict damage on player and entites while in it.\\
 asName The name of the area\\ asName The name of the area\\
 afDamage Damage to do for each update\\ afDamage Damage to do for each update\\
Line 671: Line 671:
 ''​void ReplaceEntity(std::​string asName, std::string asBodyName, std::string asNewName, std::string asNewFile); '' ​  ​Replaces an ingame entity with another entity, the new entity will appear at the center of the old entities location\\ ''​void ReplaceEntity(std::​string asName, std::string asBodyName, std::string asNewName, std::string asNewFile); '' ​  ​Replaces an ingame entity with another entity, the new entity will appear at the center of the old entities location\\
 asName Name of the ingame entity\\ asName Name of the ingame entity\\
-asBodyName The name of the body in the old entity that will be used as a center for the new entity, leave as _ckgedit_QUOTckgedit> if entity only has 1 body\\+asBodyName The name of the body in the old entity that will be used as a center for the new entity, leave as _ckgedit_QUOT__ckgedit> if entity only has 1 body\\
 asNewName The ingame name given to the new entity\\ asNewName The ingame name given to the new entity\\
 asNewFile The .ent file to be used for the new entity\\ asNewFile The .ent file to be used for the new entity\\
Line 741: Line 741:
 asState The mode to set, valid modes are "​Static",​ "​Grab",​ "​Move"​ and "​Push"​.\\ asState The mode to set, valid modes are "​Static",​ "​Grab",​ "​Move"​ and "​Push"​.\\
 \\ \\
-''​static void stdcall ​SetupLink(std::​string asName, std::string asMapFile, std::string asMapPos, std::string asStartSound,​ std::string asStopSound,​ float afFadeOutTime,​ float afFadeInTime);​ '' ​  Sets up the properties for a link.\\+''​static void __stdcall ​SetupLink(std::​string asName, std::string asMapFile, std::string asMapPos, std::string asStartSound,​ std::string asStopSound,​ float afFadeOutTime,​ float afFadeInTime); ​__''​__   Sets up the properties for a link.\\
 asName The name of the link\\ asName The name of the link\\
 asMapFile The file to be loaded\\ asMapFile The file to be loaded\\
Line 750: Line 750:
 afFadeInTime Time in seconds it takes for the fade in.\\ afFadeInTime Time in seconds it takes for the fade in.\\
 \\ \\
-''​static void stdcall SetupLinkLoadText(string asName, string asMapFile, string asMapPos, string asStartSound,​ string asStopSound,​ float afFadeOutTime,​ float afFadeInTime,​ string asTextCat, string asTextEntry);​ '' ​  Sets up the properties for a link and displays a screen with text/​picture while loading.\\+''​static void ''​ __''​stdcall SetupLinkLoadText(string asName, string asMapFile, string asMapPos, string asStartSound,​ string asStopSound,​ float afFadeOutTime,​ float afFadeInTime,​ string asTextCat, string asTextEntry);​ '' ​  Sets up the properties for a link and displays a screen with text/​picture while loading.\\
 asName The name of the link\\ asName The name of the link\\
 asMapFile The file to be loaded\\ asMapFile The file to be loaded\\
Line 761: Line 761:
 asTextEntry The text entry in translations file .lang\\ asTextEntry The text entry in translations file .lang\\
 \\ \\
-''​void SetupLinkLockedProp(std::​string asName,​std::​string asLockedSound,​ std::string asLockedDescCat,​std::​string asLockedDescEntry);​ '' ​  ​Properties for an area of type "​link",​ eg _ckgedit_QUOTarea_link_gamename", to be used if the link is "​locked"​.\\+''​void SetupLinkLockedProp(std::​string asName,​std::​string asLockedSound,​ std::string asLockedDescCat,​std::​string asLockedDescEntry);​ '' ​  ​Properties for an area of type "​link",​ eg _ckgedit_QUOT__area_link_gamename", to be used if the link is "​locked"​.\\
 asName The name of the link\\ asName The name of the link\\
 asLockedSound The "​locked sound" to play\\ asLockedSound The "​locked sound" to play\\
Line 779: Line 779:
 asNode The Node to walk to.\\ asNode The Node to walk to.\\
 afTime The time to stay at the node when reached.\\ afTime The time to stay at the node when reached.\\
-asAnimation The animation to be played when at the node. _ckgedit_QUOTckgedit> = idle.\\+asAnimation The animation to be played when at the node. _ckgedit_QUOT__ckgedit> = idle.\\
 \\ \\
 ''​void ClearEnemyPatrolNodes(std::​string asEnemy); '' ​  ​Clears all the patrol nodes for the enemy\\ ''​void ClearEnemyPatrolNodes(std::​string asEnemy); '' ​  ​Clears all the patrol nodes for the enemy\\
Line 829: Line 829:
 ''​void AllowAttachment();​ '' ​  ​Executes the attachment settings in SetupStickArea.//​ \\ ''​void AllowAttachment();​ '' ​  ​Executes the attachment settings in SetupStickArea.//​ \\
 \\ \\
-Example of an attach callback// ''​ void MyAttach(string asArea, string asBody) { if(StringContains(asBody, ​GESHI_QUOTentitynameGESHI_QUOT)) { AllowAttachment();​ } } '' ​  \\+Example of an attach callback// ''​ void MyAttach(string asArea, string asBody) { if(StringContains(asBody, ​__GESHI_QUOT__entityname__GESHI_QUOT__)) { AllowAttachment();​ } } '' ​  \\
 ''​DetachBodyFromStickArea(string asArea); '' ​  ​Detach a body from a stick area.\\ ''​DetachBodyFromStickArea(string asArea); '' ​  ​Detach a body from a stick area.\\
 asArea Name of the area.\\ asArea Name of the area.\\
 \\ \\
-''​SetupLadder(string asName,​string asAttachSound,​ string asClimbUpSound,​ string asClimbDownSound);​ '' ​  Sets properties for an area of type "​ladder"​. eg _ckgedit_QUOTarea_ladder_gamename"\\+''​SetupLadder(string asName,​string asAttachSound,​ string asClimbUpSound,​ string asClimbDownSound);​ '' ​  Sets properties for an area of type "​ladder"​. eg _ckgedit_QUOT__area_ladder_gamename"\\
 asName Name of the area.\\ asName Name of the area.\\
 asAttachSound Sound to be played as player grabs onto ladder\\ asAttachSound Sound to be played as player grabs onto ladder\\
Line 844: Line 844:
 abLoop if it should loop or not.\\ abLoop if it should loop or not.\\
 \\ \\
-''​void SetupForceArea( string asName, float afMaxForce, float afConstant, float afDestSpeed,​ float afMaxMass, bool abMulWithMass,​ bool abForceAtPoint,​ bool abAffectBodies,​ bool abAffectCharacters);​ '' ​  ​Properties for an area of type "​force",​ eg _ckgedit_QUOTarea_force_gamename".\\+''​void SetupForceArea( string asName, float afMaxForce, float afConstant, float afDestSpeed,​ float afMaxMass, bool abMulWithMass,​ bool abForceAtPoint,​ bool abAffectBodies,​ bool abAffectCharacters);​ '' ​  ​Properties for an area of type "​force",​ eg _ckgedit_QUOT__area_force_gamename".\\
 asName Name of the entity.\\ asName Name of the entity.\\
 afMaxForce the value for the maximum force to apply\\ afMaxForce the value for the maximum force to apply\\
Line 951: Line 951:
 ''​SetLampLitChangeCallback(std::​string asName,​std::​string asCallback);​ '' ​  Adds a callback for a Lamp entity, Type="​Lamp"​ in .ent, as it changes from on to off or vice versa.\\ ''​SetLampLitChangeCallback(std::​string asName,​std::​string asCallback);​ '' ​  Adds a callback for a Lamp entity, Type="​Lamp"​ in .ent, as it changes from on to off or vice versa.\\
 asName The name of the lamp entity.\\ asName The name of the lamp entity.\\
-asCallback The name of the callback, syntax: **MyFunc(bool abActive)** ​// \\+asCallback The name of the callback, syntax: **MyFunc(bool abActive)** \\
 \\ \\
-//''​SetLeverCallback(std::​string asName,​std::​string asType, std::string asCallback);​ '' ​  Adds a callback for a Lever entity, Type="​Lever"​ in .ent, as it changes states.\\+''​SetLeverCallback(std::​string asName,​std::​string asType, std::string asCallback);​ '' ​  Adds a callback for a Lever entity, Type="​Lever"​ in .ent, as it changes states.\\
 asName The name of the lever entity.\\ asName The name of the lever entity.\\
 asType What type: "​Enter",​ "​Leave"​ or "​During"​.\\ asType What type: "​Enter",​ "​Leave"​ or "​During"​.\\
 asCallback The name of the callback, syntax: **void MyFunc(string asName, int alType, int alState)** \\ asCallback The name of the callback, syntax: **void MyFunc(string asName, int alType, int alState)** \\
 type: 0=enter, 1=leave, 2=during\\ type: 0=enter, 1=leave, 2=during\\
-state: -1 = min, 0=middle, 1=max// \\+state: -1 = min, 0=middle, 1=max\\
 \\ \\
-//''​SetWheelCallback(std::​string asName,​std::​string asType,​std::​string asCallback);​ '' ​  Adds a callback for a Wheel entity, Type="​Wheel"​ in .ent.\\+''​SetWheelCallback(std::​string asName,​std::​string asType,​std::​string asCallback);​ '' ​  Adds a callback for a Wheel entity, Type="​Wheel"​ in .ent.\\
 asName The name of the wheel entity.\\ asName The name of the wheel entity.\\
 asType What type: "​Enter",​ "​Leave"​ or "​During"​.\\ asType What type: "​Enter",​ "​Leave"​ or "​During"​.\\
 asCallback The name of the callback, syntax: **void MyFunc(string asName, int alType, int alState)** \\ asCallback The name of the callback, syntax: **void MyFunc(string asName, int alType, int alState)** \\
 type: 0=enter, 1=leave, 2=during\\ type: 0=enter, 1=leave, 2=during\\
-state: -1 = min, 0=middle, 1=max// \\+state: -1 = min, 0=middle, 1=max//__ \\
 \\ \\
  
hpl1/documentation/script_reference.txt · Last modified: 2020/02/08 21:19 by muffin