The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Engine Scripts Plus [ES+ 1.3] - More sensical function names
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#1
Engine Scripts Plus [ES+ 1.3] - More sensical function names

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.

[Image: 4O75ijm.png]

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: (Select All)
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.
1.1 (2018-11-10):
  • Fixed Entity_AddBodyForce and Entity_AddBodyImpulse so they call the correct functions rather than the same as their non-body counterparts.
1.0 (2018-10-26):
  • 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?
Engine Scripts Plus reference

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
Math

Quote:
PHP Code: (Select All)
float Math_RandFloat(float afMinfloat afMax
= RandFloat

PHP Code: (Select All)
int Math_RandInt(int alMinint alMax
= RandInt

PHP Code: (Select All)
float Math_Sin(float afX
= MathSin

PHP Code: (Select All)
float Math_Cos(float afX
= MathCos

PHP Code: (Select All)
float Math_Tan(float afX
= MathTan

PHP Code: (Select All)
float Math_Asin(float afX
= MathAsin

PHP Code: (Select All)
float Math_Acos(float afX
= MathAcos

PHP Code: (Select All)
float Math_Atan2(float afXfloat afY
= MathAtan2

PHP Code: (Select All)
float Math_Sqrt(float afX
= MathSqrt

PHP Code: (Select All)
float Math_Pow(float afBasefloat afExp
= MathPow

PHP Code: (Select All)
float Math_Min(float afAfloat afB
= MathMin

PHP Code: (Select All)
float Math_Max(float afAfloat afB
= MathMax

PHP Code: (Select All)
float Math_Clamp(float afXfloat afMinfloat afMax
= MathClamp

PHP Code: (Select All)
float Math_Abs(float afX
= MathAbs


String

Quote:
PHP Code: (Select All)
bool String_Contains(stringasStringstringasSubString
= StringContains

PHP Code: (Select All)
string String_Sub(stringasStringint alStartint alCount
= StringSub

PHP Code: (Select All)
int String_ToInt(string&in asString
= StringToInt

PHP Code: (Select All)
float String_ToFloat(string&in asString
= StringToFloat

PHP Code: (Select All)
bool String_ToBool(string&in asString
= StringToBool


Debug

Quote:
PHP Code: (Select All)
void Debug_Print(stringasString
= Print

PHP Code: (Select All)
void Debug_AddMessage(stringasStringbool abCheckForDuplicates
= AddDebugMessage

PHP Code: (Select All)
void Debug_ProgLog(stringasLevelstringasMessage
= ProgLog

PHP Code: (Select All)
bool Debug_GetEnabled() 
= ScriptDebugOn


Script

Quote:
PHP Code: (Select All)
void Script_SetLocalVarInt(stringasNameint alVal
= SetLocalVarInt

PHP Code: (Select All)
void Script_AddLocalVarInt(stringasNameint alVal
= AddLocalVarInt

PHP Code: (Select All)
int Script_GetLocalVarInt(stringasName
= GetLocalVarInt

PHP Code: (Select All)
void Script_SetLocalVarFloat(stringasNamefloat afVal
= SetLocalVarFloat

PHP Code: (Select All)
void Script_AddLocalVarFloat(stringasNamefloat afVal
= AddLocalVarFloat

PHP Code: (Select All)
float Script_GetLocalVarFloat(stringasName
= GetLocalVarFloat

PHP Code: (Select All)
void Script_SetLocalVarString(stringasName, const stringasVal
= SetLocalVarString

PHP Code: (Select All)
void Script_AddLocalVarString(stringasNamestringasVal
= AddLocalVarString

PHP Code: (Select All)
string Script_GetLocalVarString(stringasName
= GetLocalVarString

PHP Code: (Select All)
void Script_SetGlobalVarInt(stringasNameint alVal
= SetGlobalVarInt

PHP Code: (Select All)
void Script_AddGlobalVarInt(stringasNameint alVal
= AddGlobalVarInt


PHP Code: (Select All)
int Script_GetGlobalVarInt(stringasName
= GetGlobalVarInt


PHP Code: (Select All)
void Script_SetGlobalVarFloat(stringasNamefloat afVal
= SetGlobalVarFloat


PHP Code: (Select All)
void Script_AddGlobalVarFloat(stringasNamefloat afVal
= AddGlobalVarFloat


PHP Code: (Select All)
float Script_GetGlobalVarFloat(stringasName
= GetGlobalVarFloat


PHP Code: (Select All)
void Script_SetGlobalVarString(stringasName, const stringasVal
= SetGlobalVarString


PHP Code: (Select All)
void Script_AddGlobalVarString(stringasNamestringasVal
= AddGlobalVarString


PHP Code: (Select All)
string Script_GetGlobalVarString(stringasName
= GetGlobalVarString


ParticleSystem

Quote:
PHP Code: (Select All)
void ParticleSystem_Preload(stringasPSFile
= PreloadParticleSystem

PHP Code: (Select All)
void ParticleSystem_CreateAtEntity(stringasPSNamestringasPSFilestringasEntitybool abSavePS
= CreateParticleSystemAtEntity


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)
= CreateParticleSystemAtEntityExt

PHP Code: (Select All)
void ParticleSystem_Destroy(stringasName
= DestroyParticleSystem

PHP Code: (Select All)
void ParticleSystem_StartPlayerSpawnPS(stringasPSFile
= StartPlayerSpawnPS

PHP Code: (Select All)
void ParticleSystem_StopPlayerSpawnPS() 
= StopPlayerSpawnPS


Sound

Quote:
PHP Code: (Select All)
void Sound_Preload(stringa
= PreloadSound

PHP Code: (Select All)
Sound_PlayAtEntity(stringastringbstringcfloat dbool e
= PlaySoundAtEntity

PHP Code: (Select All)
void Sound_FadeIn(stringafloat bbool c
= FadeInSound

PHP Code: (Select All)
void Sound_Stop(stringafloat b
= StopSound

PHP Code: (Select All)
void Sound_PlayMusic(stringabool bfloat cfloat dint ebool f
= PlayMusic

PHP Code: (Select All)
void Sound_StopMusic(float aint b
= StopMusic

PHP Code: (Select All)
void Sound_FadeGlobalVolume(float afloat b
= FadeGlobalSoundVolume

PHP Code: (Select All)
void Sound_FadeGlobalSpeed(float afloat b
= FadeGlobalSoundSpeed


void Sound_AddEffectVoice(string& asVoiceFile, string& asEffectFile, string& asTextCat, string& asTextEntry, bool abUsePosition, string& asPosEntity, float afMinDistance, float afMaxDistance)
= AddEffectVoice

PHP Code: (Select All)
void Sound_StopAllEffectVoices(float afFadeOutTime
= StopAllEffectVoices

PHP Code: (Select All)
bool Sound_GetEffectVoiceActive() 
= GetEffectVoiceActive

PHP Code: (Select All)
void Sound_SetEffectVoiceOverCallback(stringasFunc
= SetEffectVoiceOverCallback


PHP Code: (Select All)
void Sound_PlayGuiSound(stringasSoundFilefloat afVolume
= PlayGuiSound


Light

Quote:
PHP Code: (Select All)
void Light_SetVisible(stringabool b
= SetLightVisible
PHP Code: (Select All)
void Light_FadeTo(stringasLightNamefloat afRfloat afGfloat afBfloat afAfloat afRadiusfloat afTime
= FadeLightTo


PHP Code: (Select All)
void Light_SetFlickerActive(stringasLightNamebool abActive
= SetLightFlickerActive



Game


Quote:
PHP Code: (Select All)
void Game_StartCredits(stringasMusicbool abLoopMusicstringasTextCatstringasTextEntryint alEndNum
= StartCredits


PHP Code: (Select All)
void Game_StartDemoEnd() 
= StartDemoEnd


PHP Code: (Select All)
void Game_AutoSave() 
= AutoSave


PHP Code: (Select All)
void Game_SetupLoadScreen(string&asTextCatstring&asTextEntryint alRandomNumstring&asImageFile
= SetupLoadScreen


PHP Code: (Select All)
void Game_SetDeathHint(stringasTextCategorystringasTextEntry
= SetDeathHint


PHP Code: (Select All)
void Game_DisableDeathStartSound() 
= DisableDeathStartSound


PHP Code: (Select All)
void Game_GiveHint(stringasNamestringasMessageCatstringasMessageEntryfloat afTimeShown
= GiveHint


PHP Code: (Select All)
void Game_RemoveHint(stringasName
= RemoveHint


PHP Code: (Select All)
void Game_BlockHint(stringasName
= BlockHint


PHP Code: (Select All)
void Game_UnblockHint(stringasName
= UnBlockHint


PHP Code: (Select All)
void Game_CreateDataCache() 
= CreateDataCache


PHP Code: (Select All)
void Game_DestroyDataCache() 
= DestroyDataCache



Map

Quote:
void Map_CheckPoint(string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry)

= CheckPoint


PHP Code: (Select All)
void Map_Change(stringasMapNamestringasStartPosstringasStartSoundstringasEndSound
= ChangeMap


PHP Code: (Select All)
void Map_ClearSavedMaps() 
= ClearSavedMaps


PHP Code: (Select All)
void Map_SetDisplayNameEntry(stringasNameEntry
= SetMapDisplayNameEntry


PHP Code: (Select All)
void Map_SetSkyboxActive(bool abActive
= SetSkyBoxActive


PHP Code: (Select All)
void Map_SetSkyboxTexture(string asTexture
= SetSkyboxTexture


PHP Code: (Select All)
void Map_SetSkyboxColor(float afRfloat afGfloat afBfloat afA
= SetSkyboxColor


PHP Code: (Select All)
void Map_SetFogActive(bool abActive
= SetFogActive


PHP Code: (Select All)
void Map_SetFogColor(float afRfloat afGfloat afBfloat afA
= SetFogColor


PHP Code: (Select All)
void Map_SetFogProperties(float afStartfloat afEndfloat afFalloffExpbool abCulling
= SetFogProperties



Timer


Quote:
PHP Code: (Select All)
void Timer_Add(stringasNamefloat afTimestringasFunction
= AddTimer

PHP Code: (Select All)
void Timer_Remove(stringasName
= RemoveTimer

PHP Code: (Select All)
float Timer_GetTimeLeft(stringasName
= GetTimerTimeLefT

Effect

Quote:
PHP Code: (Select All)
void Effect_FadeOut(float afTime
= FadeOut

PHP Code: (Select All)
void Effect_FadeIn(float afTime
= FadeIn

PHP Code: (Select All)
void Effect_FadeImageTrailTo(float afAmountfloat afSpeed
= FadeImageTrailTo

PHP Code: (Select All)
void Effect_FadeSepiaColorTo(float afAmountfloat afSpeed
= FadeSepiaColorTo

PHP Code: (Select All)
void Effect_FadeRadialBlurTo(float afSizefloat afSpeed
= FadeRadialBlurTo

PHP Code: (Select All)
void Effect_SetRadialBlurStartDist(float afStartDist
= SetRadialBlurStartDist

PHP Code: (Select All)
void Effect_StartFlash(float afFadeInfloat afWhitefloat afFadeOut
= StartEffectFlash

PHP Code: (Select All)
void Effect_StartEmotionFlash(stringasTextCatstringasTextEntrystringasSound
= StartEffectEmotionFlash

PHP Code: (Select All)
bool Effect_GetFlashbackIsActive() 
= GetFlashbackIsActive

PHP Code: (Select All)
void Effect_StartScreenShake(float afAmountfloat afTimefloat afFadeInTimefloat afFadeOutTime
= StartScreenShake

PHP Code: (Select All)
void Effect_SetInDarknessEffectsActive(bool abX
= SetInDarknessEffectsActive

PHP Code: (Select All)
void Effect_SetInsanitySetEnabled(stringasSetbool abX
= SetInsanitySetEnabled

PHP Code: (Select All)
void Effect_StartInsanityEvent(string &in asEventName
= StartInsanityEvent

PHP Code: (Select All)
void Effect_StartRandomInsanityEvent() 
= StartRandomInsanityEvent

PHP Code: (Select All)
void Effect_StopCurrentInsanityEvent() 
= StopCurrentInsanityEvent

PHP Code: (Select All)
void Effect_FadeFOVMulTo(float afXfloat afSpeed
= FadePlayerFOVMulTo

PHP Code: (Select All)
void Effect_FadeAspectMulTo(float afXfloat afSpeed
= FadePlayerAspectMulTo

PHP Code: (Select All)
void Effect_FadePlayerRollTo(float afXfloat afSpeedMulfloat afMaxSpeed
= FadePlayerRollTo

PHP Code: (Select All)
void Effect_MovePlayerHeadPos(float afXfloat afYfloat afZfloat afSpeedfloat afSlowDownDist
= MovePlayerHeadPos

PHP Code: (Select All)
void Effect_SetMessage(stringasTextCategorystringasTextEntryfloat afTime
= SetMessage


Player

Quote:
PHP Code: (Select All)
void Player_SetActive(bool abActive
= SetPlayerActive

PHP Code: (Select All)
void Player_ChangeStateToNormal() 
= ChangePlayerStateToNormal

PHP Code: (Select All)
void Player_SetCrouching(bool abCrouch
= SetPlayerCrouching

PHP Code: (Select All)
void Player_AddPlayerBodyForce(float afXfloat afYfloat afZbool abUseLocalCoords
= AddPlayerBodyForce

PHP Code: (Select All)
void Player_ShowCrossHairIcons(bool abX
= ShowPlayerCrossHairIcons

PHP Code: (Select All)
void Player_SetSanity(float afSanity
= SetPlayerSanity

PHP Code: (Select All)
void Player_AddSanity(float afSanity
= AddPlayerSanity

PHP Code: (Select All)
float Player_GetSanity() 
= GetPlayerSanity

PHP Code: (Select All)
void Player_SetHealth(float afHealth
= SetPlayerHealth

PHP Code: (Select All)
void Player_AddPlayerHealth(float afHealth
= AddPlayerHealth

PHP Code: (Select All)
float Player_GetHealth() 
= GetPlayerHealth

PHP Code: (Select All)
void Player_SetLampOil(float afOil
= SetPlayerLampOil

PHP Code: (Select All)
void Player_AddLampOil(float afOil
= AddPlayerLampOil

PHP Code: (Select All)
float Player_GetLampOil() 
= GetPlayerLampOil

PHP Code: (Select All)
float Player_GetSpeed() 
= GetPlayerSpeed

PHP Code: (Select All)
float Player_GetYSpeed() 
= GetPlayerYSpeed

PHP Code: (Select All)
void Player_SetSanityDrainDisabled(bool abX
= SetSanityDrainDisabled


PHP Code: (Select All)
void Player_GiveSanityBoost() 
= GiveSanityBoost


PHP Code: (Select All)
void Player_GiveSanityBoostSmall() 
= GiveSanityBoostSmall


PHP Code: (Select All)
void Player_GiveSanityDamage(float afAmountbool abUseEffect
= GiveSanityDamage


PHP Code: (Select All)
void Player_GiveDamage(float afAmountstringasTypebool abSpinHeadbool abLethal
= GivePlayerDamage


PHP Code: (Select All)
void Player_StartLookAt(stringasEntityNamefloat afSpeedMulfloat afMaxSpeedstringasAtTargetCallback
= StartPlayerLookAt


PHP Code: (Select All)
void Player_StopLookAt() 
= StopPlayerLookAt


PHP Code: (Select All)
void Player_SetMoveSpeedMul(float afMul
= SetPlayerMoveSpeedMul


PHP Code: (Select All)
void Player_SetRunSpeedMul(float afMul
= SetPlayerRunSpeedMul


PHP Code: (Select All)
void Player_SetLookSpeedMul(float afMul
= SetPlayerLookSpeedMul


PHP Code: (Select All)
void Player_SetJumpForceMul(float afMul
= SetPlayerJumpForceMul


PHP Code: (Select All)
void Player_SetJumpDisabled(bool abX
= SetPlayerJumpDisabled


PHP Code: (Select All)
void Player_SetCrouchDisabled(bool abX
= SetPlayerCrouchDisabled


PHP Code: (Select All)
void Player_Teleport(stringasStartPosName
= TeleportPlayer


PHP Code: (Select All)
void Player_SetLanternActive(bool abXbool abUseEffects
= SetLanternActive


PHP Code: (Select All)
void Player_SetLanternDisabled(bool abX
= SetLanternDisabled


PHP Code: (Select All)
bool Player_GetLanternActive() 
= GetLanternActive


PHP Code: (Select All)
void Player_SetLanternLitCallback(stringasCallback
= SetLanternLitCallback


PHP Code: (Select All)
void Player_MoveForward(float afAmount
= MovePlayerForward


PHP Code: (Select All)
void Player_SetFallDamageDisabled(bool abX
= SetPlayerFallDamageDisabled


PHP Code: (Select All)
void Player_SetPos(float afXfloat afYfloat afZ
= SetPlayerPos


PHP Code: (Select All)
float Player_GetPosX() 
= GetPlayerPosX


PHP Code: (Select All)
float Player_GetPosY() 
= GetPlayerPosY


PHP Code: (Select All)
float Player_GetPosZ() 
= GetPlayerPosZ


Journal

Quote:
PHP Code: (Select All)
void Journal_AddNote(stringasNameAndTextEntrystringasImage
= AddNote


PHP Code: (Select All)
void Journal_AddDiary(stringasNameAndTextEntrystringasImage
= AddDiary


PHP Code: (Select All)
void Journal_ReturnOpen(bool abOpenJournal
= ReturnOpenJournal


PHP Code: (Select All)
void Journal_AddQuest(stringasNamestringasNameAndTextEntry
= AddQuest


PHP Code: (Select All)
void Journal_CompleteQuest(stringasNamestringasNameAndTextEntry
= CompleteQuest


PHP Code: (Select All)
bool Journal_GetQuestIsAdded(stringasName
= QuestIsAdded


PHP Code: (Select All)
void Journal_SetNumberOfQuestsInMap(int alNumberOfQuests
= SetNumberOfQuestsInMap


Inventory

Quote:
PHP Code: (Select All)
void Inventory_Exit() 
= ExitInventory

PHP Code: (Select All)
void Inventory_SetDisabled(bool abX
= SetInventoryDisabled

PHP Code: (Select All)
void Inventory_SetMessage(stringasTextCategorystringasTextEntryfloat afTime
= SetInventoryMessage


PHP Code: (Select All)
void Inventory_GiveItem(stringasNamestringasTypestringasSubTypeNamestringasImageNamefloat afAmount
= GiveItem

PHP Code: (Select All)
void Inventory_GiveItemFromFile(stringasNamestringasFileName
= GiveItemFromFile


PHP Code: (Select All)
void Inventory_RemoveItem(stringasName
= RemoveItem


PHP Code: (Select All)
bool Inventory_HasItem(stringasName
= HasItem


PHP Code: (Select All)
void Inventory_AddCombineCallback(stringasNamestringasItemAstringasItemBstringasFunctionbool abAutoRemove
= AddCombineCallback


PHP Code: (Select All)
void Inventory_RemoveCombineCallback(stringasName
= RemoveCombineCallback


PHP Code: (Select All)
void Inventory_AddUseItemCallback(stringasNamestringasItemstringasEntitystringasFunctionbool abAutoDestroy
= AddUseItemCallback


PHP Code: (Select All)
void Inventory_RemoveUseItemCallback(stringasName
= RemoveUseItemCallback


Entity


Quote:
PHP Code: (Select All)
void Entity_SetActive(stringasNamebool abActive
= SetEntityActive


PHP Code: (Select All)
void Entity_SetVisible(stringasNamebool abVisible
= SetEntityVisible


PHP Code: (Select All)
bool Entity_GetExists(stringasName
= GetEntityExists


PHP Code: (Select All)
void Entity_SetCustomFocusCrossHair(stringasNamestringasCrossHair
= SetEntityCustomFocusCrossHair


PHP Code: (Select All)
void Entity_CreateAtArea(stringasEntityNamestringasEntityFilestringasAreaNamebool abFullGameSave
= CreateEntityAtArea


void Entity_Replace(string &in asName, string &in asBodyName, string &in asNewEntityName, string &in asNewEntityFile, bool abFullGameSave)

= ReplaceEntity


PHP Code: (Select All)
void Entity_PlaceAtEntity(string &in asNamestring &in asTargetEntitystring &in asTargetBodyNamebool abUseRotation
= PlaceEntityAtEntity


PHP Code: (Select All)
void Entity_SetPos(string &in asNamefloat afXfloat afYfloat afZ
= SetEntityPos


PHP Code: (Select All)
float Entity_GetPosX(string &in asName
= GetEntityPosX


PHP Code: (Select All)
float Entity_GetPosY(string &in asName
= GetEntityPosY

PHP Code: (Select All)
float Entity_GetPosZ(string &in asName
= GetEntityPosZ


PHP Code: (Select All)
void Entity_SetPlayerLookAtCallback(stringasNamestringasCallbackbool abRemoveWhenLookedAt
= SetEntityPlayerLookAtCallback


PHP Code: (Select All)
void Entity_SetPlayerInteractCallback(stringasNamestringasCallbackbool abRemoveOnInteraction
= SetEntityPlayerInteractCallback


PHP Code: (Select All)
void Entity_SetCallbackFunc(stringasNamestringasCallback
= SetEntityCallbackFunc


PHP Code: (Select All)
void Entity_SetConnectionStateChangeCallback(stringasNamestringasCallback
= SetEntityConnectionStateChangeCallback


PHP Code: (Select All)
void Entity_SetInteractionDisabled(stringasNamebool abDisabled
= SetEntityInteractionDisabled


PHP Code: (Select All)
void Entity_BreakJoint(stringasName
= BreakJoint


void Entity_AddCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates)
= AddEntityCollideCallback


PHP Code: (Select All)
void Entity_RemoveCollideCallback(stringasParentNamestringasChildName
= RemoveEntityCollideCallback


PHP Code: (Select All)
bool Entity_GetCollide(stringasEntityAstringasEntityB
= GetEntitiesCollide


PHP Code: (Select All)
void Entity_SetBodyMass(string &in asNamefloat afMass
= SetBodyMass


PHP Code: (Select All)
float Entity_GetBodyMass(string &in asName
= GetBodyMass


PHP Code: (Select All)
void Entity_SetEffectActive(stringasNamebool abActivebool abFadeAndPlaySounds
= SetPropEffectActive


PHP Code: (Select All)
void Entity_SetActiveAndFade(stringasNamebool abActivefloat afFadeTime
= SetPropActiveAndFade


PHP Code: (Select All)
void Entity_SetStaticPhysics(stringasNamebool abX
= SetPropStaticPhysics

PHP Code: (Select All)
bool Entity_GetInteractedWith(stringasName
= GetPropIsInteractedWith


void Entity_RotateToSpeed(string& asName, float afAcc, float afGoalSpeed, float afAxisX, float afAxisY, float afAxisZ, bool abResetSpeed, string& asOffsetArea)

= RotatePropToSpeed


PHP Code: (Select All)
void Entity_StopMovement(stringasName
= StopPropMovement


void Entity_AttachEntity(string& asPropName, string& asAttachName, string& asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ)

= AttachPropToProp


PHP Code: (Select All)
void Entity_RemoveAttachedEntity(stringasPropNamestringasAttachName
= RemoveAttachedPropFromProp

PHP Code: (Select All)
void Entity_SetHealth(stringasNamefloat afHealth
= SetPropHealth


PHP Code: (Select All)
void Entity_AddHealth(stringasNamefloat afHealth
= AddPropHealth


PHP Code: (Select All)
float Entity_GetHealth(stringasName
= GetPropHealth

PHP Code: (Select All)
void Entity_Reset(stringasName
= ResetProp


PHP Code: (Select All)
void Entity_PlayAnimation(stringasPropstringasAnimationfloat afFadeTimebool abLoopstringasCallback
= PlayPropAnimation


PHP Code: (Select All)
void Entity_AddForce(stringasNamefloat afXfloat afYfloat afZstringasCoordSystem
= AddPropForce


PHP Code: (Select All)
void Entity_AddImpulse(stringasNamefloat afXfloat afYfloat afZstringasCoordSystem
= AddPropImpulse

PHP Code: (Select All)
void Entity_AddBodyForce(stringasNamefloat afXfloat afYfloat afZstringasCoordSystem
= AddBodyForce


PHP Code: (Select All)
void Entity_AddBodyImpulse(stringasNamefloat afXfloat afYfloat afZstringasCoordSystem
= AddBodyImpulse



void Entity_ConnectWithRope(string& asName, string& asPropName, string& asRopeName, bool abInteractOnly, float afSpeedMul, float afToMinSpeed, float afToMaxSpeed, bool abInvert, int alStatesUsed)

= InteractConnectPropWithRope



void Entity_ConnectWithMoveObject(string& asName, string& asPropName, string& asMoveObjectName, bool abInteractOnly, bool abInvert, int alStatesUsed)

= InteractConnectPropWithMoveObject



void Entity_ConnectEntities(string& asName, string& asMainEntity, string& asConnectEntity, bool abInvertStateSent, int alStatesUsed, string& asCallbackFunc)

= ConnectEntities


PHP Code: (Select All)
void Entity_SetStuckState(stringasNameint alState
= SetPropObjectStuckState


PHP Code: (Select All)
void Entity_SetAllowStickyAreaAttachment(bool abX
= SetAllowStickyAreaAttachment


PHP Code: (Select All)
void Entity_AttachToStickyArea(stringasAreaNamestringasProp
= AttachPropToStickyArea


PHP Code: (Select All)
void Entity_AttachBodyToStickyArea(stringasAreaNamestringasBody
= AttachBodyToStickyArea


PHP Code: (Select All)
void Entity_DetachFromStickyArea(stringasAreaName
= DetachFromStickyArea


MoveObject


Quote:
PHP Code: (Select All)
void MoveObject_SetState(stringasNamefloat afState
= SetMoveObjectState


void MoveObject_SetStateExt(string& asName, float afState, float afAcc, float afMaxSpeed, float afSlowdownDist, bool abResetSpeed)

= SetMoveObjectStateExt



Lamp

Quote:
PHP Code: (Select All)
void Entity_SetLampLit(stringasNamebool abLitbool abEffects
= SetLampLit


SwingDoor

Quote:
PHP Code: (Select All)
void SwingDoor_SetLocked(stringasNamebool abLockedbool abEffects
= SetSwingDoorLocked


PHP Code: (Select All)
void SwingDoor_SetClosed(stringasNamebool abClosedbool abEffects
= SetSwingDoorClosed


PHP Code: (Select All)
bool SwingDoor_GetLocked(stringasName
= GetSwingDoorLocked


PHP Code: (Select All)
bool SwingDoor_GetClosed(stringasName
= GetSwingDoorClosed


PHP Code: (Select All)
void SwingDoor_SetDisableAutoClose(stringasNamebool abDisableAutoClose
= SetSwingDoorDisableAutoClose


PHP Code: (Select All)
int SwingDoor_GetState(stringasName
= GetSwingDoorState



LevelDoor

Quote:
PHP Code: (Select All)
void LevelDoor_SetLocked(stringasNamebool abLocked
= SetLevelDoorLocked

PHP Code: (Select All)
void LevelDoor_SetLockedSound(stringasNamestringasSound
= SetLevelDoorLockedSound


PHP Code: (Select All)
void LevelDoor_SetLockedText(stringasNamestringasTextCatstringasTextEntry
= SetLevelDoorLockedText



Wheel

Quote:
PHP Code: (Select All)
void Wheel_SetStuckState(stringasNameint alStatebool abEffects
= SetWheelStuckState


PHP Code: (Select All)
void Wheel_SetAngle(stringasNamefloat afAnglebool abAutoMove
= SetWheelAngle

PHP Code: (Select All)
void Wheel_SetInteractionDisablesStuck(stringasNamebool abX
= SetWheelInteractionDisablesStuck



Lever

Quote:
PHP Code: (Select All)
void Lever_SetStuckState(stringasNameint alStatebool abEffects
= SetLeverStuckState


PHP Code: (Select All)
void Lever_SetInteractionDisablesStuck(stringasNamebool abX
= SetLeverInteractionDisablesStuck


PHP Code: (Select All)
int Lever_GetState(stringasName
= GetLeverState



Button

Quote:
PHP Code: (Select All)
void Button_SetSwitchedOn(stringasNamebool abSwitchedOnbool abEffects
= SetButtonSwitchedOn



MultiSlider

Quote:
PHP Code: (Select All)
void MultiSlider_SetStuckState(stringasNameint alStuckStatebool abEffects
= SetMultiSliderStuckState


PHP Code: (Select All)
void MultiSlider_SetCallback(stringasNamestringasCallback
= SetMultiSliderCallback



NPC

Quote:
PHP Code: (Select All)
void NPC_SetAwake(stringasNamebool abAwakebool abEffects
= SetNPCAwake


PHP Code: (Select All)
void NPC_SetFollowPlayer(stringasNamebool abX
= SetNPCFollowPlayer


Enemy


Quote:
PHP Code: (Select All)
void Enemy_SetDisabled(stringasNamebool abDisabled
= SetEnemyDisabled

PHP Code: (Select All)
void Enemy_SetIsHallucination(stringasNamebool abX
= SetEnemyIsHallucination


PHP Code: (Select All)
void Enemy_FadeToSmoke(stringasNamebool abPlaySound
= FadeEnemyToSmoke


PHP Code: (Select All)
void Enemy_ShowPlayerPosition(stringasName
= ShowEnemyPlayerPosition


PHP Code: (Select All)
void Enemy_AlertPlayerPresence(string &in asName
= AlertEnemyOfPlayerPresence


PHP Code: (Select All)
void Enemy_SetTriggersDisabled(stringasNamebool abX
= SetEnemyDisableTriggers


PHP Code: (Select All)
void Enemy_AddPatrolNode(stringasNamestringasNodeNamefloat afWaitTimestringasAnimation
= AddEnemyPatrolNode

PHP Code: (Select All)
void Enemy_ClearPatrolNodes(stringasEnemyName
= ClearEnemyPatrolNodes


PHP Code: (Select All)
void Enemy_SetSanityDecreaseActive(string &in asNamebool abX
= SetEnemySanityDecreaseActive


PHP Code: (Select All)
void Enemy_TeleportToNode(string &in asEnemyNamestring &in asNodeNamebool abChangeY
= TeleportEnemyToNode

PHP Code: (Select All)
void Enemy_TeleportToEntity(string &in asEnemyNamestring &in asTargetEntitystring &in asTargetBodybool abChangeY
= TeleportEnemyToEntity


PHP Code: (Select All)
void Enemy_ChangeManPigPose(string&in asNamestring&in asPoseType
= ChangeManPigPose


PHP Code: (Select All)
void Enemy_SetTeslaPigFadeDisabled(string&in asNamebool abX
= SetTeslaPigFadeDisabled


PHP Code: (Select All)
void Enemy_SetTeslaPigSoundDisabled(string&in asNamebool abX
= SetTeslaPigSoundDisabled


PHP Code: (Select All)
void Enemy_SetTeslaPigEasyEscapeDisabled(string&in asNamebool abX
= SetTeslaPigEasyEscapeDisabled


PHP Code: (Select All)
void Enemy_ForceTeslaPigSighting(string&in asName
= ForceTeslaPigSighting


PHP Code: (Select All)
string Enemy_GetStateName(string &in asName
= GetEnemyStateName

(This post was last modified: 12-03-2018, 06:04 PM by Mudbill.)
10-26-2018, 11:44 PM
Find


Messages In This Thread
Engine Scripts Plus [ES+ 1.3] - More sensical function names - by Mudbill - 10-26-2018, 11:44 PM



Users browsing this thread: 1 Guest(s)