10-26-2018, 11:44 PM
One of the good things to come from SOMA / HPL3 is the naming convention used for script functions to group related things together. This was something I thought would be useful to have in HPL2, so I made this library for those wishing to use exactly that.
What's different?
Basically every single script function has been given a new name. Instead of SetEntityActive, you use Entity_SetActive. Every function has been renamed to start with a category word, then an underscore, then the description of the function. This is a standard that HPL2 has been lacking.
Why?
There are several reason why one might want this. The biggest benefit is autocompletion. In pretty much every script editor, without additional configuration, you can now start typing "Entity_" or "Game_" or "Player_" and produce a list of all functions related to that category. See screenshot from the Atom editor below.
Another reason, although more subjective, is that things are more clearly defined, so when reading your code, it can be easier to quickly see what a function does and what it affects.
How do I get started?
Because HPL2 does not allow the use of importing scripts, you will need to copy and paste the provided contents and put them into each script file you want to use this convention in. The contents are provided in a "minified" form, which means the code has been reduced in size where possible and is spread across a single line. This line is very long, so make sure you do not use line wrapping in your editor so it becomes as invisible as possible.
Click here to see the contents you need to copy, or click here to download it as a file.
Again, in case you didn't understand, all you need to do is paste the code into your .hps file, somewhere in the root level (where OnStart resides). Example:
While the code is in your script file, you can use all the functions and they should autocomplete as well, depending on your editor.
Changelog
1.2 (2018-11-10):
Anything else?
The documentation for each function follows here, if you need it. I won't explain them in-depth, but I will tell you which original function lies behind so you can look up the documentation for that function. Most are self-explanatory however, and they all use the exact same parameters as the originals. Here's a link to the official Engine Scripts documentation if you need it.
Before we get into it, here are all the categories that the scripts belong to:
String
Debug
Script
ParticleSystem
Sound
Light
Game
Map
Timer
Effect
Player
Journal
Inventory
Entity
MoveObject
Lamp
SwingDoor
LevelDoor
Wheel
Lever
Button
MultiSlider
NPC
Enemy
What's different?
Basically every single script function has been given a new name. Instead of SetEntityActive, you use Entity_SetActive. Every function has been renamed to start with a category word, then an underscore, then the description of the function. This is a standard that HPL2 has been lacking.
Why?
There are several reason why one might want this. The biggest benefit is autocompletion. In pretty much every script editor, without additional configuration, you can now start typing "Entity_" or "Game_" or "Player_" and produce a list of all functions related to that category. See screenshot from the Atom editor below.
Another reason, although more subjective, is that things are more clearly defined, so when reading your code, it can be easier to quickly see what a function does and what it affects.
How do I get started?
Because HPL2 does not allow the use of importing scripts, you will need to copy and paste the provided contents and put them into each script file you want to use this convention in. The contents are provided in a "minified" form, which means the code has been reduced in size where possible and is spread across a single line. This line is very long, so make sure you do not use line wrapping in your editor so it becomes as invisible as possible.
Click here to see the contents you need to copy, or click here to download it as a file.
Again, in case you didn't understand, all you need to do is paste the code into your .hps file, somewhere in the root level (where OnStart resides). Example:
PHP Code:
void OnStart()
{
Entity_SetActive("chair", false);
}
/* ES+ BEGIN VERSION 1.0 */ ETC ETC ETC /* ES+ END */
While the code is in your script file, you can use all the functions and they should autocomplete as well, depending on your editor.
Changelog
Spoiler below!
1.2 (2018-11-10):
- Added categories Lever, Wheel, Button, MultiSlider, SwingDoor, LevelDoor, Lamp, MoveObject.
- Changed Entity_SetObjectStuckState to just Entity_SetStuckState.
- Fixed Entity_AddBodyForce and Entity_AddBodyImpulse so they call the correct functions rather than the same as their non-body counterparts.
- Initial release
Anything else?
- If you want some trivia, it took about 4 hours to create, and is about 1000 lines non-minified. Oh, but the forum post took like 4 more.
- Want to have a look at the non-minified version? Here you go.
- Why so late? Yeah, I don't know. I guess I just suddenly felt like doing it. Wish I had done it years ago though, but better late than never?
- Did you know that InsanityEventIsActive() actually returns a void, which practically renders this function useless?
The documentation for each function follows here, if you need it. I won't explain them in-depth, but I will tell you which original function lies behind so you can look up the documentation for that function. Most are self-explanatory however, and they all use the exact same parameters as the originals. Here's a link to the official Engine Scripts documentation if you need it.
Before we get into it, here are all the categories that the scripts belong to:
- Debug
- Script
- Math
- String
- Game
- ParticleSystem
- Sound
- Light
- Map
- Timer
- Effect
- Player
- Journal
- Inventory
- Entity
- MoveObject
- Lamp
- LevelDoor
- SwingDoor
- Wheel
- Lever
- Button
- MultiSlider
- NPC
- Enemy
Quote:= RandFloatPHP Code:float Math_RandFloat(float afMin, float afMax)
= RandIntPHP Code:int Math_RandInt(int alMin, int alMax)
= MathSinPHP Code:float Math_Sin(float afX)
= MathCosPHP Code:float Math_Cos(float afX)
= MathTanPHP Code:float Math_Tan(float afX)
= MathAsinPHP Code:float Math_Asin(float afX)
= MathAcosPHP Code:float Math_Acos(float afX)
= MathAtan2PHP Code:float Math_Atan2(float afX, float afY)
= MathSqrtPHP Code:float Math_Sqrt(float afX)
= MathPowPHP Code:float Math_Pow(float afBase, float afExp)
= MathMinPHP Code:float Math_Min(float afA, float afB)
= MathMaxPHP Code:float Math_Max(float afA, float afB)
= MathClampPHP Code:float Math_Clamp(float afX, float afMin, float afMax)
= MathAbsPHP Code:float Math_Abs(float afX)
String
Quote:= StringContainsPHP Code:bool String_Contains(string& asString, string& asSubString)
= StringSubPHP Code:string String_Sub(string& asString, int alStart, int alCount)
= StringToIntPHP Code:int String_ToInt(string&in asString)
= StringToFloatPHP Code:float String_ToFloat(string&in asString)
= StringToBoolPHP Code:bool String_ToBool(string&in asString)
Debug
Quote:PHP Code:void Debug_Print(string& asString)
= AddDebugMessagePHP Code:void Debug_AddMessage(string& asString, bool abCheckForDuplicates)
= ProgLogPHP Code:void Debug_ProgLog(string& asLevel, string& asMessage)
= ScriptDebugOnPHP Code:bool Debug_GetEnabled()
Script
Quote:= SetLocalVarIntPHP Code:void Script_SetLocalVarInt(string& asName, int alVal)
= AddLocalVarIntPHP Code:void Script_AddLocalVarInt(string& asName, int alVal)
= GetLocalVarIntPHP Code:int Script_GetLocalVarInt(string& asName)
= SetLocalVarFloatPHP Code:void Script_SetLocalVarFloat(string& asName, float afVal)
= AddLocalVarFloatPHP Code:void Script_AddLocalVarFloat(string& asName, float afVal)
= GetLocalVarFloatPHP Code:float Script_GetLocalVarFloat(string& asName)
= SetLocalVarStringPHP Code:void Script_SetLocalVarString(string& asName, const string& asVal)
= AddLocalVarStringPHP Code:void Script_AddLocalVarString(string& asName, string& asVal)
= GetLocalVarStringPHP Code:string Script_GetLocalVarString(string& asName)
= SetGlobalVarIntPHP Code:void Script_SetGlobalVarInt(string& asName, int alVal)
= AddGlobalVarIntPHP Code:void Script_AddGlobalVarInt(string& asName, int alVal)
= GetGlobalVarIntPHP Code:int Script_GetGlobalVarInt(string& asName)
= SetGlobalVarFloatPHP Code:void Script_SetGlobalVarFloat(string& asName, float afVal)
= AddGlobalVarFloatPHP Code:void Script_AddGlobalVarFloat(string& asName, float afVal)
= GetGlobalVarFloatPHP Code:float Script_GetGlobalVarFloat(string& asName)
= SetGlobalVarStringPHP Code:void Script_SetGlobalVarString(string& asName, const string& asVal)
= AddGlobalVarStringPHP Code:void Script_AddGlobalVarString(string& asName, string& asVal)
= GetGlobalVarStringPHP Code:string Script_GetGlobalVarString(string& asName)
ParticleSystem
Quote:= PreloadParticleSystemPHP Code:void ParticleSystem_Preload(string& asPSFile)
= CreateParticleSystemAtEntityPHP Code:void ParticleSystem_CreateAtEntity(string& asPSName, string& asPSFile, string& asEntity, bool abSavePS)
= CreateParticleSystemAtEntityExtCode:void ParticleSystem_CreateAtEntityExt(string& asPSName, string& asPSFile, string& asEntity, bool abSavePS, float afR, float afG, float afB, float afA, bool abFadeAtDistance, float afFadeMinEnd, float afFadeMinStart, float afFadeMaxStart, float afFadeMaxEnd)
= DestroyParticleSystemPHP Code:void ParticleSystem_Destroy(string& asName)
= StartPlayerSpawnPSPHP Code:void ParticleSystem_StartPlayerSpawnPS(string& asPSFile)
= StopPlayerSpawnPSPHP Code:void ParticleSystem_StopPlayerSpawnPS()
Sound
Quote:= PreloadSoundPHP Code:void Sound_Preload(string& a)
= PlaySoundAtEntityPHP Code:Sound_PlayAtEntity(string& a, string& b, string& c, float d, bool e)
= FadeInSoundPHP Code:void Sound_FadeIn(string& a, float b, bool c)
= StopSoundPHP Code:void Sound_Stop(string& a, float b)
= PlayMusicPHP Code:void Sound_PlayMusic(string& a, bool b, float c, float d, int e, bool f)
= StopMusicPHP Code:void Sound_StopMusic(float a, int b)
= FadeGlobalSoundVolumePHP Code:void Sound_FadeGlobalVolume(float a, float b)
= FadeGlobalSoundSpeedPHP Code:void Sound_FadeGlobalSpeed(float a, float b)
= AddEffectVoiceCode:void Sound_AddEffectVoice(string& asVoiceFile, string& asEffectFile, string& asTextCat, string& asTextEntry, bool abUsePosition, string& asPosEntity, float afMinDistance, float afMaxDistance)
= StopAllEffectVoicesPHP Code:void Sound_StopAllEffectVoices(float afFadeOutTime)
= GetEffectVoiceActivePHP Code:bool Sound_GetEffectVoiceActive()
= SetEffectVoiceOverCallbackPHP Code:void Sound_SetEffectVoiceOverCallback(string& asFunc)
= PlayGuiSoundPHP Code:void Sound_PlayGuiSound(string& asSoundFile, float afVolume)
Light
Quote:= SetLightVisiblePHP Code:void Light_SetVisible(string& a, bool b)
= FadeLightToPHP Code:void Light_FadeTo(string& asLightName, float afR, float afG, float afB, float afA, float afRadius, float afTime)
= SetLightFlickerActivePHP Code:void Light_SetFlickerActive(string& asLightName, bool abActive)
Game
Quote:= StartCreditsPHP Code:void Game_StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum)
= StartDemoEndPHP Code:void Game_StartDemoEnd()
= AutoSavePHP Code:void Game_AutoSave()
= SetupLoadScreenPHP Code:void Game_SetupLoadScreen(string&asTextCat, string&asTextEntry, int alRandomNum, string&asImageFile)
= SetDeathHintPHP Code:void Game_SetDeathHint(string& asTextCategory, string& asTextEntry)
= DisableDeathStartSoundPHP Code:void Game_DisableDeathStartSound()
= GiveHintPHP Code:void Game_GiveHint(string& asName, string& asMessageCat, string& asMessageEntry, float afTimeShown)
= RemoveHintPHP Code:void Game_RemoveHint(string& asName)
= BlockHintPHP Code:void Game_BlockHint(string& asName)
= UnBlockHintPHP Code:void Game_UnblockHint(string& asName)
= CreateDataCachePHP Code:void Game_CreateDataCache()
= DestroyDataCachePHP Code:void Game_DestroyDataCache()
Map
Quote:Code:void Map_CheckPoint(string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry)
= CheckPoint
= ChangeMapPHP Code:void Map_Change(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound)
= ClearSavedMapsPHP Code:void Map_ClearSavedMaps()
= SetMapDisplayNameEntryPHP Code:void Map_SetDisplayNameEntry(string& asNameEntry)
= SetSkyBoxActivePHP Code:void Map_SetSkyboxActive(bool abActive)
= SetSkyboxTexturePHP Code:void Map_SetSkyboxTexture(string & asTexture)
= SetSkyboxColorPHP Code:void Map_SetSkyboxColor(float afR, float afG, float afB, float afA)
= SetFogActivePHP Code:void Map_SetFogActive(bool abActive)
= SetFogColorPHP Code:void Map_SetFogColor(float afR, float afG, float afB, float afA)
= SetFogPropertiesPHP Code:void Map_SetFogProperties(float afStart, float afEnd, float afFalloffExp, bool abCulling)
Timer
Quote:= AddTimerPHP Code:void Timer_Add(string& asName, float afTime, string& asFunction)
= RemoveTimerPHP Code:void Timer_Remove(string& asName)
= GetTimerTimeLefTPHP Code:float Timer_GetTimeLeft(string& asName)
Effect
Quote:= FadeOutPHP Code:void Effect_FadeOut(float afTime)
= FadeInPHP Code:void Effect_FadeIn(float afTime)
= FadeImageTrailToPHP Code:void Effect_FadeImageTrailTo(float afAmount, float afSpeed)
= FadeSepiaColorToPHP Code:void Effect_FadeSepiaColorTo(float afAmount, float afSpeed)
= FadeRadialBlurToPHP Code:void Effect_FadeRadialBlurTo(float afSize, float afSpeed)
= SetRadialBlurStartDistPHP Code:void Effect_SetRadialBlurStartDist(float afStartDist)
= StartEffectFlashPHP Code:void Effect_StartFlash(float afFadeIn, float afWhite, float afFadeOut)
= StartEffectEmotionFlashPHP Code:void Effect_StartEmotionFlash(string& asTextCat, string& asTextEntry, string& asSound)
= GetFlashbackIsActivePHP Code:bool Effect_GetFlashbackIsActive()
= StartScreenShakePHP Code:void Effect_StartScreenShake(float afAmount, float afTime, float afFadeInTime, float afFadeOutTime)
= SetInDarknessEffectsActivePHP Code:void Effect_SetInDarknessEffectsActive(bool abX)
= SetInsanitySetEnabledPHP Code:void Effect_SetInsanitySetEnabled(string& asSet, bool abX)
= StartInsanityEventPHP Code:void Effect_StartInsanityEvent(string &in asEventName)
= StartRandomInsanityEventPHP Code:void Effect_StartRandomInsanityEvent()
= StopCurrentInsanityEventPHP Code:void Effect_StopCurrentInsanityEvent()
= FadePlayerFOVMulToPHP Code:void Effect_FadeFOVMulTo(float afX, float afSpeed)
= FadePlayerAspectMulToPHP Code:void Effect_FadeAspectMulTo(float afX, float afSpeed)
= FadePlayerRollToPHP Code:void Effect_FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed)
= MovePlayerHeadPosPHP Code:void Effect_MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist)
= SetMessagePHP Code:void Effect_SetMessage(string& asTextCategory, string& asTextEntry, float afTime)
Player
Quote:= SetPlayerActivePHP Code:void Player_SetActive(bool abActive)
= ChangePlayerStateToNormalPHP Code:void Player_ChangeStateToNormal()
= SetPlayerCrouchingPHP Code:void Player_SetCrouching(bool abCrouch)
= AddPlayerBodyForcePHP Code:void Player_AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords)
= ShowPlayerCrossHairIconsPHP Code:void Player_ShowCrossHairIcons(bool abX)
= SetPlayerSanityPHP Code:void Player_SetSanity(float afSanity)
= AddPlayerSanityPHP Code:void Player_AddSanity(float afSanity)
= GetPlayerSanityPHP Code:float Player_GetSanity()
= SetPlayerHealthPHP Code:void Player_SetHealth(float afHealth)
= AddPlayerHealthPHP Code:void Player_AddPlayerHealth(float afHealth)
= GetPlayerHealthPHP Code:float Player_GetHealth()
= SetPlayerLampOilPHP Code:void Player_SetLampOil(float afOil)
= AddPlayerLampOilPHP Code:void Player_AddLampOil(float afOil)
= GetPlayerLampOilPHP Code:float Player_GetLampOil()
= GetPlayerSpeedPHP Code:float Player_GetSpeed()
= GetPlayerYSpeedPHP Code:float Player_GetYSpeed()
= SetSanityDrainDisabledPHP Code:void Player_SetSanityDrainDisabled(bool abX)
= GiveSanityBoostPHP Code:void Player_GiveSanityBoost()
= GiveSanityBoostSmallPHP Code:void Player_GiveSanityBoostSmall()
= GiveSanityDamagePHP Code:void Player_GiveSanityDamage(float afAmount, bool abUseEffect)
= GivePlayerDamagePHP Code:void Player_GiveDamage(float afAmount, string& asType, bool abSpinHead, bool abLethal)
= StartPlayerLookAtPHP Code:void Player_StartLookAt(string& asEntityName, float afSpeedMul, float afMaxSpeed, string& asAtTargetCallback)
= StopPlayerLookAtPHP Code:void Player_StopLookAt()
= SetPlayerMoveSpeedMulPHP Code:void Player_SetMoveSpeedMul(float afMul)
= SetPlayerRunSpeedMulPHP Code:void Player_SetRunSpeedMul(float afMul)
= SetPlayerLookSpeedMulPHP Code:void Player_SetLookSpeedMul(float afMul)
= SetPlayerJumpForceMulPHP Code:void Player_SetJumpForceMul(float afMul)
= SetPlayerJumpDisabledPHP Code:void Player_SetJumpDisabled(bool abX)
= SetPlayerCrouchDisabledPHP Code:void Player_SetCrouchDisabled(bool abX)
= TeleportPlayerPHP Code:void Player_Teleport(string& asStartPosName)
= SetLanternActivePHP Code:void Player_SetLanternActive(bool abX, bool abUseEffects)
= SetLanternDisabledPHP Code:void Player_SetLanternDisabled(bool abX)
= GetLanternActivePHP Code:bool Player_GetLanternActive()
= SetLanternLitCallbackPHP Code:void Player_SetLanternLitCallback(string& asCallback)
= MovePlayerForwardPHP Code:void Player_MoveForward(float afAmount)
= SetPlayerFallDamageDisabledPHP Code:void Player_SetFallDamageDisabled(bool abX)
= SetPlayerPosPHP Code:void Player_SetPos(float afX, float afY, float afZ)
= GetPlayerPosXPHP Code:float Player_GetPosX()
= GetPlayerPosYPHP Code:float Player_GetPosY()
= GetPlayerPosZPHP Code:float Player_GetPosZ()
Journal
Quote:= AddNotePHP Code:void Journal_AddNote(string& asNameAndTextEntry, string& asImage)
= AddDiaryPHP Code:void Journal_AddDiary(string& asNameAndTextEntry, string& asImage)
= ReturnOpenJournalPHP Code:void Journal_ReturnOpen(bool abOpenJournal)
= AddQuestPHP Code:void Journal_AddQuest(string& asName, string& asNameAndTextEntry)
= CompleteQuestPHP Code:void Journal_CompleteQuest(string& asName, string& asNameAndTextEntry)
= QuestIsAddedPHP Code:bool Journal_GetQuestIsAdded(string& asName)
= SetNumberOfQuestsInMapPHP Code:void Journal_SetNumberOfQuestsInMap(int alNumberOfQuests)
Inventory
Quote:= ExitInventoryPHP Code:void Inventory_Exit()
= SetInventoryDisabledPHP Code:void Inventory_SetDisabled(bool abX)
= SetInventoryMessagePHP Code:void Inventory_SetMessage(string& asTextCategory, string& asTextEntry, float afTime)
= GiveItemPHP Code:void Inventory_GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount)
= GiveItemFromFilePHP Code:void Inventory_GiveItemFromFile(string& asName, string& asFileName)
= RemoveItemPHP Code:void Inventory_RemoveItem(string& asName)
= HasItemPHP Code:bool Inventory_HasItem(string& asName)
= AddCombineCallbackPHP Code:void Inventory_AddCombineCallback(string& asName, string& asItemA, string& asItemB, string& asFunction, bool abAutoRemove)
= RemoveCombineCallbackPHP Code:void Inventory_RemoveCombineCallback(string& asName)
= AddUseItemCallbackPHP Code:void Inventory_AddUseItemCallback(string& asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy)
= RemoveUseItemCallbackPHP Code:void Inventory_RemoveUseItemCallback(string& asName)
Entity
Quote:= SetEntityActivePHP Code:void Entity_SetActive(string& asName, bool abActive)
= SetEntityVisiblePHP Code:void Entity_SetVisible(string& asName, bool abVisible)
= GetEntityExistsPHP Code:bool Entity_GetExists(string& asName)
= SetEntityCustomFocusCrossHairPHP Code:void Entity_SetCustomFocusCrossHair(string& asName, string& asCrossHair)
= CreateEntityAtAreaPHP Code:void Entity_CreateAtArea(string& asEntityName, string& asEntityFile, string& asAreaName, bool abFullGameSave)
Code:void Entity_Replace(string &in asName, string &in asBodyName, string &in asNewEntityName, string &in asNewEntityFile, bool abFullGameSave)
= ReplaceEntity
= PlaceEntityAtEntityPHP Code:void Entity_PlaceAtEntity(string &in asName, string &in asTargetEntity, string &in asTargetBodyName, bool abUseRotation)
= SetEntityPosPHP Code:void Entity_SetPos(string &in asName, float afX, float afY, float afZ)
= GetEntityPosXPHP Code:float Entity_GetPosX(string &in asName)
= GetEntityPosYPHP Code:float Entity_GetPosY(string &in asName)
= GetEntityPosZPHP Code:float Entity_GetPosZ(string &in asName)
= SetEntityPlayerLookAtCallbackPHP Code:void Entity_SetPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt)
= SetEntityPlayerInteractCallbackPHP Code:void Entity_SetPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction)
= SetEntityCallbackFuncPHP Code:void Entity_SetCallbackFunc(string& asName, string& asCallback)
= SetEntityConnectionStateChangeCallbackPHP Code:void Entity_SetConnectionStateChangeCallback(string& asName, string& asCallback)
= SetEntityInteractionDisabledPHP Code:void Entity_SetInteractionDisabled(string& asName, bool abDisabled)
= BreakJointPHP Code:void Entity_BreakJoint(string& asName)
= AddEntityCollideCallbackCode:void Entity_AddCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates)
= RemoveEntityCollideCallbackPHP Code:void Entity_RemoveCollideCallback(string& asParentName, string& asChildName)
= GetEntitiesCollidePHP Code:bool Entity_GetCollide(string& asEntityA, string& asEntityB)
= SetBodyMassPHP Code:void Entity_SetBodyMass(string &in asName, float afMass)
= GetBodyMassPHP Code:float Entity_GetBodyMass(string &in asName)
= SetPropEffectActivePHP Code:void Entity_SetEffectActive(string& asName, bool abActive, bool abFadeAndPlaySounds)
= SetPropActiveAndFadePHP Code:void Entity_SetActiveAndFade(string& asName, bool abActive, float afFadeTime)
= SetPropStaticPhysicsPHP Code:void Entity_SetStaticPhysics(string& asName, bool abX)
= GetPropIsInteractedWithPHP Code:bool Entity_GetInteractedWith(string& asName)
Code:void Entity_RotateToSpeed(string& asName, float afAcc, float afGoalSpeed, float afAxisX, float afAxisY, float afAxisZ, bool abResetSpeed, string& asOffsetArea)
= RotatePropToSpeed
= StopPropMovementPHP Code:void Entity_StopMovement(string& asName)
Code:void Entity_AttachEntity(string& asPropName, string& asAttachName, string& asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ)
= AttachPropToProp
= RemoveAttachedPropFromPropPHP Code:void Entity_RemoveAttachedEntity(string& asPropName, string& asAttachName)
= SetPropHealthPHP Code:void Entity_SetHealth(string& asName, float afHealth)
= AddPropHealthPHP Code:void Entity_AddHealth(string& asName, float afHealth)
= GetPropHealthPHP Code:float Entity_GetHealth(string& asName)
= ResetPropPHP Code:void Entity_Reset(string& asName)
= PlayPropAnimationPHP Code:void Entity_PlayAnimation(string& asProp, string& asAnimation, float afFadeTime, bool abLoop, string& asCallback)
= AddPropForcePHP Code:void Entity_AddForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem)
= AddPropImpulsePHP Code:void Entity_AddImpulse(string& asName, float afX, float afY, float afZ, string& asCoordSystem)
= AddBodyForcePHP Code:void Entity_AddBodyForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem)
= AddBodyImpulsePHP Code:void Entity_AddBodyImpulse(string& asName, float afX, float afY, float afZ, string& asCoordSystem)
Code:void Entity_ConnectWithRope(string& asName, string& asPropName, string& asRopeName, bool abInteractOnly, float afSpeedMul, float afToMinSpeed, float afToMaxSpeed, bool abInvert, int alStatesUsed)
= InteractConnectPropWithRope
Code:void Entity_ConnectWithMoveObject(string& asName, string& asPropName, string& asMoveObjectName, bool abInteractOnly, bool abInvert, int alStatesUsed)
= InteractConnectPropWithMoveObject
Code:void Entity_ConnectEntities(string& asName, string& asMainEntity, string& asConnectEntity, bool abInvertStateSent, int alStatesUsed, string& asCallbackFunc)
= ConnectEntities
= SetPropObjectStuckStatePHP Code:void Entity_SetStuckState(string& asName, int alState)
= SetAllowStickyAreaAttachmentPHP Code:void Entity_SetAllowStickyAreaAttachment(bool abX)
= AttachPropToStickyAreaPHP Code:void Entity_AttachToStickyArea(string& asAreaName, string& asProp)
= AttachBodyToStickyAreaPHP Code:void Entity_AttachBodyToStickyArea(string& asAreaName, string& asBody)
= DetachFromStickyAreaPHP Code:void Entity_DetachFromStickyArea(string& asAreaName)
MoveObject
Quote:= SetMoveObjectStatePHP Code:void MoveObject_SetState(string& asName, float afState)
Code:void MoveObject_SetStateExt(string& asName, float afState, float afAcc, float afMaxSpeed, float afSlowdownDist, bool abResetSpeed)
= SetMoveObjectStateExt
Lamp
Quote:= SetLampLitPHP Code:void Entity_SetLampLit(string& asName, bool abLit, bool abEffects)
SwingDoor
Quote:= SetSwingDoorLockedPHP Code:void SwingDoor_SetLocked(string& asName, bool abLocked, bool abEffects)
= SetSwingDoorClosedPHP Code:void SwingDoor_SetClosed(string& asName, bool abClosed, bool abEffects)
= GetSwingDoorLockedPHP Code:bool SwingDoor_GetLocked(string& asName)
= GetSwingDoorClosedPHP Code:bool SwingDoor_GetClosed(string& asName)
= SetSwingDoorDisableAutoClosePHP Code:void SwingDoor_SetDisableAutoClose(string& asName, bool abDisableAutoClose)
= GetSwingDoorStatePHP Code:int SwingDoor_GetState(string& asName)
LevelDoor
Quote:= SetLevelDoorLockedPHP Code:void LevelDoor_SetLocked(string& asName, bool abLocked)
= SetLevelDoorLockedSoundPHP Code:void LevelDoor_SetLockedSound(string& asName, string& asSound)
= SetLevelDoorLockedTextPHP Code:void LevelDoor_SetLockedText(string& asName, string& asTextCat, string& asTextEntry)
Wheel
Quote:= SetWheelStuckStatePHP Code:void Wheel_SetStuckState(string& asName, int alState, bool abEffects)
= SetWheelAnglePHP Code:void Wheel_SetAngle(string& asName, float afAngle, bool abAutoMove)
= SetWheelInteractionDisablesStuckPHP Code:void Wheel_SetInteractionDisablesStuck(string& asName, bool abX)
Lever
Quote:= SetLeverStuckStatePHP Code:void Lever_SetStuckState(string& asName, int alState, bool abEffects)
= SetLeverInteractionDisablesStuckPHP Code:void Lever_SetInteractionDisablesStuck(string& asName, bool abX)
= GetLeverStatePHP Code:int Lever_GetState(string& asName)
Button
Quote:= SetButtonSwitchedOnPHP Code:void Button_SetSwitchedOn(string& asName, bool abSwitchedOn, bool abEffects)
MultiSlider
Quote:= SetMultiSliderStuckStatePHP Code:void MultiSlider_SetStuckState(string& asName, int alStuckState, bool abEffects)
= SetMultiSliderCallbackPHP Code:void MultiSlider_SetCallback(string& asName, string& asCallback)
NPC
Quote:= SetNPCAwakePHP Code:void NPC_SetAwake(string& asName, bool abAwake, bool abEffects)
= SetNPCFollowPlayerPHP Code:void NPC_SetFollowPlayer(string& asName, bool abX)
Enemy
Quote:= SetEnemyDisabledPHP Code:void Enemy_SetDisabled(string& asName, bool abDisabled)
= SetEnemyIsHallucinationPHP Code:void Enemy_SetIsHallucination(string& asName, bool abX)
= FadeEnemyToSmokePHP Code:void Enemy_FadeToSmoke(string& asName, bool abPlaySound)
= ShowEnemyPlayerPositionPHP Code:void Enemy_ShowPlayerPosition(string& asName)
= AlertEnemyOfPlayerPresencePHP Code:void Enemy_AlertPlayerPresence(string &in asName)
= SetEnemyDisableTriggersPHP Code:void Enemy_SetTriggersDisabled(string& asName, bool abX)
= AddEnemyPatrolNodePHP Code:void Enemy_AddPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation)
= ClearEnemyPatrolNodesPHP Code:void Enemy_ClearPatrolNodes(string& asEnemyName)
= SetEnemySanityDecreaseActivePHP Code:void Enemy_SetSanityDecreaseActive(string &in asName, bool abX)
= TeleportEnemyToNodePHP Code:void Enemy_TeleportToNode(string &in asEnemyName, string &in asNodeName, bool abChangeY)
= TeleportEnemyToEntityPHP Code:void Enemy_TeleportToEntity(string &in asEnemyName, string &in asTargetEntity, string &in asTargetBody, bool abChangeY)
= ChangeManPigPosePHP Code:void Enemy_ChangeManPigPose(string&in asName, string&in asPoseType)
= SetTeslaPigFadeDisabledPHP Code:void Enemy_SetTeslaPigFadeDisabled(string&in asName, bool abX)
= SetTeslaPigSoundDisabledPHP Code:void Enemy_SetTeslaPigSoundDisabled(string&in asName, bool abX)
= SetTeslaPigEasyEscapeDisabledPHP Code:void Enemy_SetTeslaPigEasyEscapeDisabled(string&in asName, bool abX)
= ForceTeslaPigSightingPHP Code:void Enemy_ForceTeslaPigSighting(string&in asName)
= GetEnemyStateNamePHP Code:string Enemy_GetStateName(string &in asName)