| 
		
	
		| Mudbill   Muderator
 
 Posts: 3,881
 Threads: 59
 Joined: Apr 2013
 Reputation: 
179
 | 
			| 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]](https://i.imgur.com/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:
 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 Anything else?
 
Engine Scripts Plus referenceIf 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:
 
MathDebug
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:= RandFloatfloat Math_RandFloat(float afMin, float afMax) 
 
 = RandIntint Math_RandInt(int alMin, int alMax) 
 
 = MathSinfloat Math_Sin(float afX) 
 
 = MathCosfloat Math_Cos(float afX) 
 
 = MathTanfloat Math_Tan(float afX) 
 
 = MathAsinfloat Math_Asin(float afX) 
 
 = MathAcosfloat Math_Acos(float afX) 
 
 = MathAtan2float Math_Atan2(float afX, float afY) 
 
 = MathSqrtfloat Math_Sqrt(float afX) 
 
 = MathPowfloat Math_Pow(float afBase, float afExp) 
 
 = MathMinfloat Math_Min(float afA, float afB) 
 
 = MathMaxfloat Math_Max(float afA, float afB) 
 
 = MathClampfloat Math_Clamp(float afX, float afMin, float afMax) 
 
 = MathAbsfloat Math_Abs(float afX) 
 String
 Quote:= StringContainsbool String_Contains(string& asString, string& asSubString) 
 
 = StringSubstring String_Sub(string& asString, int alStart, int alCount) 
 
 = StringToIntint String_ToInt(string&in asString) 
 
 = StringToFloatfloat String_ToFloat(string&in asString) 
 
 = StringToBoolbool String_ToBool(string&in asString) 
 Debug
 Quote:= Printvoid Debug_Print(string& asString) 
 
 = AddDebugMessagevoid Debug_AddMessage(string& asString, bool abCheckForDuplicates) 
 
 = ProgLogvoid Debug_ProgLog(string& asLevel, string& asMessage) 
 = ScriptDebugOn
 Script
 Quote:= SetLocalVarIntvoid Script_SetLocalVarInt(string& asName, int alVal) 
 
 = AddLocalVarIntvoid Script_AddLocalVarInt(string& asName, int alVal) 
 
 = GetLocalVarIntint Script_GetLocalVarInt(string& asName) 
 
 = SetLocalVarFloatvoid Script_SetLocalVarFloat(string& asName, float afVal) 
 
 = AddLocalVarFloatvoid Script_AddLocalVarFloat(string& asName, float afVal) 
 
 = GetLocalVarFloatfloat Script_GetLocalVarFloat(string& asName) 
 
 = SetLocalVarStringvoid Script_SetLocalVarString(string& asName, const string& asVal) 
 
 = AddLocalVarStringvoid Script_AddLocalVarString(string& asName, string& asVal) 
 
 = GetLocalVarStringstring Script_GetLocalVarString(string& asName) 
 
 = SetGlobalVarIntvoid Script_SetGlobalVarInt(string& asName, int alVal) 
 
 = AddGlobalVarIntvoid Script_AddGlobalVarInt(string& asName, int alVal) 
 
 
 = GetGlobalVarIntint Script_GetGlobalVarInt(string& asName) 
 
 
 = SetGlobalVarFloatvoid Script_SetGlobalVarFloat(string& asName, float afVal) 
 
 
 = AddGlobalVarFloatvoid Script_AddGlobalVarFloat(string& asName, float afVal) 
 
 
 = GetGlobalVarFloatfloat Script_GetGlobalVarFloat(string& asName) 
 
 
 = SetGlobalVarStringvoid Script_SetGlobalVarString(string& asName, const string& asVal) 
 
 
 = AddGlobalVarStringvoid Script_AddGlobalVarString(string& asName, string& asVal) 
 
 
 = GetGlobalVarStringstring Script_GetGlobalVarString(string& asName) 
 ParticleSystem
 Quote:= PreloadParticleSystemvoid ParticleSystem_Preload(string& asPSFile) 
 
 = CreateParticleSystemAtEntityvoid ParticleSystem_CreateAtEntity(string& asPSName, string& asPSFile, string& asEntity, bool abSavePS) 
 
 
 = CreateParticleSystemAtEntityExtvoid 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)
 
 = DestroyParticleSystemvoid ParticleSystem_Destroy(string& asName) 
 
 = StartPlayerSpawnPSvoid ParticleSystem_StartPlayerSpawnPS(string& asPSFile) 
 
 = StopPlayerSpawnPSvoid ParticleSystem_StopPlayerSpawnPS() 
 Sound
 Quote:= PreloadSoundvoid Sound_Preload(string& a) 
 
 = PlaySoundAtEntitySound_PlayAtEntity(string& a, string& b, string& c, float d, bool e) 
 
 = FadeInSoundvoid Sound_FadeIn(string& a, float b, bool c) 
 
 = StopSoundvoid Sound_Stop(string& a, float b) 
 
 = PlayMusicvoid Sound_PlayMusic(string& a, bool b, float c, float d, int e, bool f) 
 
 = StopMusicvoid Sound_StopMusic(float a, int b) 
 
 = FadeGlobalSoundVolumevoid Sound_FadeGlobalVolume(float a, float b) 
 
 = FadeGlobalSoundSpeedvoid Sound_FadeGlobalSpeed(float a, float b) 
 
 
 = AddEffectVoicevoid Sound_AddEffectVoice(string& asVoiceFile, string& asEffectFile, string& asTextCat, string& asTextEntry, bool abUsePosition, string& asPosEntity, float afMinDistance, float afMaxDistance)
 
 = StopAllEffectVoicesvoid Sound_StopAllEffectVoices(float afFadeOutTime) 
 
 = GetEffectVoiceActivebool Sound_GetEffectVoiceActive() 
 
 = SetEffectVoiceOverCallbackvoid Sound_SetEffectVoiceOverCallback(string& asFunc) 
 
 
 = PlayGuiSoundvoid Sound_PlayGuiSound(string& asSoundFile, float afVolume) 
 Light
 Quote:= SetLightVisiblevoid Light_SetVisible(string& a, bool b) 
 = FadeLightTovoid Light_FadeTo(string& asLightName, float afR, float afG, float afB, float afA, float afRadius, float afTime) 
 
 
 = SetLightFlickerActivevoid Light_SetFlickerActive(string& asLightName, bool abActive) 
 Game
 Quote:= StartCreditsvoid Game_StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum) 
 
 = StartDemoEnd
 
 
 = AutoSave
 
 
 
 = SetupLoadScreenvoid Game_SetupLoadScreen(string&asTextCat, string&asTextEntry, int alRandomNum, string&asImageFile) 
 
 
 = SetDeathHintvoid Game_SetDeathHint(string& asTextCategory, string& asTextEntry) 
 
 
 = DisableDeathStartSoundvoid Game_DisableDeathStartSound() 
 
 
 = GiveHintvoid Game_GiveHint(string& asName, string& asMessageCat, string& asMessageEntry, float afTimeShown) 
 
 
 = RemoveHintvoid Game_RemoveHint(string& asName) 
 
 
 = BlockHintvoid Game_BlockHint(string& asName) 
 
 
 = UnBlockHintvoid Game_UnblockHint(string& asName) 
 
 
 = CreateDataCachevoid Game_CreateDataCache() 
 
 
 = DestroyDataCachevoid Game_DestroyDataCache() 
 Map
 Quote:void Map_CheckPoint(string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry)
= CheckPoint
 
 
 
 = ChangeMapvoid Map_Change(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound) 
 
 
 = ClearSavedMapsvoid Map_ClearSavedMaps() 
 
 
 = SetMapDisplayNameEntryvoid Map_SetDisplayNameEntry(string& asNameEntry) 
 
 
 = SetSkyBoxActivevoid Map_SetSkyboxActive(bool abActive) 
 
 
 = SetSkyboxTexturevoid Map_SetSkyboxTexture(string & asTexture) 
 
 
 = SetSkyboxColorvoid Map_SetSkyboxColor(float afR, float afG, float afB, float afA) 
 
 
 = SetFogActivevoid Map_SetFogActive(bool abActive) 
 
 
 = SetFogColorvoid Map_SetFogColor(float afR, float afG, float afB, float afA) 
 
 
 = SetFogPropertiesvoid Map_SetFogProperties(float afStart, float afEnd, float afFalloffExp, bool abCulling) 
 Timer
 Quote:= AddTimervoid Timer_Add(string& asName, float afTime, string& asFunction) 
 
 = RemoveTimervoid Timer_Remove(string& asName) 
 
 = GetTimerTimeLefTfloat Timer_GetTimeLeft(string& asName) 
 Effect
 Quote:= FadeOutvoid Effect_FadeOut(float afTime) 
 
 = FadeInvoid Effect_FadeIn(float afTime) 
 
 = FadeImageTrailTovoid Effect_FadeImageTrailTo(float afAmount, float afSpeed) 
 
 = FadeSepiaColorTovoid Effect_FadeSepiaColorTo(float afAmount, float afSpeed) 
 
 = FadeRadialBlurTovoid Effect_FadeRadialBlurTo(float afSize, float afSpeed) 
 
 = SetRadialBlurStartDistvoid Effect_SetRadialBlurStartDist(float afStartDist) 
 
 = StartEffectFlashvoid Effect_StartFlash(float afFadeIn, float afWhite, float afFadeOut) 
 
 = StartEffectEmotionFlashvoid Effect_StartEmotionFlash(string& asTextCat, string& asTextEntry, string& asSound) 
 
 = GetFlashbackIsActivebool Effect_GetFlashbackIsActive() 
 
 = StartScreenShakevoid Effect_StartScreenShake(float afAmount, float afTime, float afFadeInTime, float afFadeOutTime) 
 
 = SetInDarknessEffectsActivevoid Effect_SetInDarknessEffectsActive(bool abX) 
 
 = SetInsanitySetEnabledvoid Effect_SetInsanitySetEnabled(string& asSet, bool abX) 
 
 = StartInsanityEventvoid Effect_StartInsanityEvent(string &in asEventName) 
 
 = StartRandomInsanityEventvoid Effect_StartRandomInsanityEvent() 
 
 = StopCurrentInsanityEventvoid Effect_StopCurrentInsanityEvent() 
 
 = FadePlayerFOVMulTovoid Effect_FadeFOVMulTo(float afX, float afSpeed) 
 
 = FadePlayerAspectMulTovoid Effect_FadeAspectMulTo(float afX, float afSpeed) 
 
 = FadePlayerRollTovoid Effect_FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed) 
 
 = MovePlayerHeadPosvoid Effect_MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist) 
 
 = SetMessagevoid Effect_SetMessage(string& asTextCategory, string& asTextEntry, float afTime) 
 Player
 Quote:= SetPlayerActivevoid Player_SetActive(bool abActive) 
 
 = ChangePlayerStateToNormalvoid Player_ChangeStateToNormal() 
 
 = SetPlayerCrouchingvoid Player_SetCrouching(bool abCrouch) 
 
 = AddPlayerBodyForcevoid Player_AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords) 
 
 = ShowPlayerCrossHairIconsvoid Player_ShowCrossHairIcons(bool abX) 
 
 = SetPlayerSanityvoid Player_SetSanity(float afSanity) 
 
 = AddPlayerSanityvoid Player_AddSanity(float afSanity) 
 = GetPlayerSanity
 
 
 = SetPlayerHealthvoid Player_SetHealth(float afHealth) 
 
 = AddPlayerHealthvoid Player_AddPlayerHealth(float afHealth) 
 = GetPlayerHealth
 
 
 = SetPlayerLampOilvoid Player_SetLampOil(float afOil) 
 
 = AddPlayerLampOilvoid Player_AddLampOil(float afOil) 
 
 = GetPlayerLampOilfloat Player_GetLampOil() 
 = GetPlayerSpeed
 
 = GetPlayerYSpeed
 
 
 = SetSanityDrainDisabledvoid Player_SetSanityDrainDisabled(bool abX) 
 
 
 = GiveSanityBoostvoid Player_GiveSanityBoost() 
 
 
 = GiveSanityBoostSmallvoid Player_GiveSanityBoostSmall() 
 
 
 = GiveSanityDamagevoid Player_GiveSanityDamage(float afAmount, bool abUseEffect) 
 
 
 = GivePlayerDamagevoid Player_GiveDamage(float afAmount, string& asType, bool abSpinHead, bool abLethal) 
 
 
 = StartPlayerLookAtvoid Player_StartLookAt(string& asEntityName, float afSpeedMul, float afMaxSpeed, string& asAtTargetCallback) 
 
 = StopPlayerLookAt
 
 
 
 = SetPlayerMoveSpeedMulvoid Player_SetMoveSpeedMul(float afMul) 
 
 
 = SetPlayerRunSpeedMulvoid Player_SetRunSpeedMul(float afMul) 
 
 
 = SetPlayerLookSpeedMulvoid Player_SetLookSpeedMul(float afMul) 
 
 
 = SetPlayerJumpForceMulvoid Player_SetJumpForceMul(float afMul) 
 
 
 = SetPlayerJumpDisabledvoid Player_SetJumpDisabled(bool abX) 
 
 
 = SetPlayerCrouchDisabledvoid Player_SetCrouchDisabled(bool abX) 
 
 
 = TeleportPlayervoid Player_Teleport(string& asStartPosName) 
 
 
 = SetLanternActivevoid Player_SetLanternActive(bool abX, bool abUseEffects) 
 
 
 = SetLanternDisabledvoid Player_SetLanternDisabled(bool abX) 
 
 
 = GetLanternActivebool Player_GetLanternActive() 
 
 
 = SetLanternLitCallbackvoid Player_SetLanternLitCallback(string& asCallback) 
 
 
 = MovePlayerForwardvoid Player_MoveForward(float afAmount) 
 
 
 = SetPlayerFallDamageDisabledvoid Player_SetFallDamageDisabled(bool abX) 
 
 
 = SetPlayerPosvoid Player_SetPos(float afX, float afY, float afZ) 
 
 = GetPlayerPosX
 
 
 = GetPlayerPosY
 
 
 = GetPlayerPosZ
 Journal
 Quote:= AddNotevoid Journal_AddNote(string& asNameAndTextEntry, string& asImage) 
 
 
 = AddDiaryvoid Journal_AddDiary(string& asNameAndTextEntry, string& asImage) 
 
 
 = ReturnOpenJournalvoid Journal_ReturnOpen(bool abOpenJournal) 
 
 
 = AddQuestvoid Journal_AddQuest(string& asName, string& asNameAndTextEntry) 
 
 
 = CompleteQuestvoid Journal_CompleteQuest(string& asName, string& asNameAndTextEntry) 
 
 
 = QuestIsAddedbool Journal_GetQuestIsAdded(string& asName) 
 
 
 = SetNumberOfQuestsInMapvoid Journal_SetNumberOfQuestsInMap(int alNumberOfQuests) 
 Inventory
 Quote:= ExitInventory
 
 = SetInventoryDisabledvoid Inventory_SetDisabled(bool abX) 
 
 = SetInventoryMessagevoid Inventory_SetMessage(string& asTextCategory, string& asTextEntry, float afTime) 
 
 
 = GiveItemvoid Inventory_GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount) 
 
 = GiveItemFromFilevoid Inventory_GiveItemFromFile(string& asName, string& asFileName) 
 
 
 = RemoveItemvoid Inventory_RemoveItem(string& asName) 
 
 
 = HasItembool Inventory_HasItem(string& asName) 
 
 
 = AddCombineCallbackvoid Inventory_AddCombineCallback(string& asName, string& asItemA, string& asItemB, string& asFunction, bool abAutoRemove) 
 
 
 = RemoveCombineCallbackvoid Inventory_RemoveCombineCallback(string& asName) 
 
 
 = AddUseItemCallbackvoid Inventory_AddUseItemCallback(string& asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy) 
 
 
 = RemoveUseItemCallbackvoid Inventory_RemoveUseItemCallback(string& asName) 
 Entity
 Quote:= SetEntityActivevoid Entity_SetActive(string& asName, bool abActive) 
 
 
 = SetEntityVisiblevoid Entity_SetVisible(string& asName, bool abVisible) 
 
 
 = GetEntityExistsbool Entity_GetExists(string& asName) 
 
 
 = SetEntityCustomFocusCrossHairvoid Entity_SetCustomFocusCrossHair(string& asName, string& asCrossHair) 
 
 
 = CreateEntityAtAreavoid Entity_CreateAtArea(string& asEntityName, string& asEntityFile, string& asAreaName, bool abFullGameSave) 
 
 
 void Entity_Replace(string &in asName, string &in asBodyName, string &in asNewEntityName, string &in asNewEntityFile, bool abFullGameSave)
= ReplaceEntity
 
 
 
 = PlaceEntityAtEntityvoid Entity_PlaceAtEntity(string &in asName, string &in asTargetEntity, string &in asTargetBodyName, bool abUseRotation) 
 
 
 = SetEntityPosvoid Entity_SetPos(string &in asName, float afX, float afY, float afZ) 
 
 
 = GetEntityPosXfloat Entity_GetPosX(string &in asName) 
 
 
 = GetEntityPosYfloat Entity_GetPosY(string &in asName) 
 
 = GetEntityPosZfloat Entity_GetPosZ(string &in asName) 
 
 
 = SetEntityPlayerLookAtCallbackvoid Entity_SetPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt) 
 
 
 = SetEntityPlayerInteractCallbackvoid Entity_SetPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction) 
 
 
 = SetEntityCallbackFuncvoid Entity_SetCallbackFunc(string& asName, string& asCallback) 
 
 
 = SetEntityConnectionStateChangeCallbackvoid Entity_SetConnectionStateChangeCallback(string& asName, string& asCallback) 
 
 
 = SetEntityInteractionDisabledvoid Entity_SetInteractionDisabled(string& asName, bool abDisabled) 
 
 
 = BreakJointvoid Entity_BreakJoint(string& asName) 
 
 
 = AddEntityCollideCallbackvoid Entity_AddCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates)
 
 
 = RemoveEntityCollideCallbackvoid Entity_RemoveCollideCallback(string& asParentName, string& asChildName) 
 
 
 = GetEntitiesCollidebool Entity_GetCollide(string& asEntityA, string& asEntityB) 
 
 
 = SetBodyMassvoid Entity_SetBodyMass(string &in asName, float afMass) 
 
 
 = GetBodyMassfloat Entity_GetBodyMass(string &in asName) 
 
 
 = SetPropEffectActivevoid Entity_SetEffectActive(string& asName, bool abActive, bool abFadeAndPlaySounds) 
 
 
 = SetPropActiveAndFadevoid Entity_SetActiveAndFade(string& asName, bool abActive, float afFadeTime) 
 
 
 = SetPropStaticPhysicsvoid Entity_SetStaticPhysics(string& asName, bool abX) 
 
 = GetPropIsInteractedWithbool Entity_GetInteractedWith(string& asName) 
 
 
 void Entity_RotateToSpeed(string& asName, float afAcc, float afGoalSpeed, float afAxisX, float afAxisY, float afAxisZ, bool abResetSpeed, string& asOffsetArea)
= RotatePropToSpeed
 
 
 
 = StopPropMovementvoid Entity_StopMovement(string& asName) 
 
 
 void Entity_AttachEntity(string& asPropName, string& asAttachName, string& asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ)
= AttachPropToProp
 
 
 
 = RemoveAttachedPropFromPropvoid Entity_RemoveAttachedEntity(string& asPropName, string& asAttachName) 
 
 = SetPropHealthvoid Entity_SetHealth(string& asName, float afHealth) 
 
 
 = AddPropHealthvoid Entity_AddHealth(string& asName, float afHealth) 
 
 
 = GetPropHealthfloat Entity_GetHealth(string& asName) 
 
 = ResetPropvoid Entity_Reset(string& asName) 
 
 
 = PlayPropAnimationvoid Entity_PlayAnimation(string& asProp, string& asAnimation, float afFadeTime, bool abLoop, string& asCallback) 
 
 
 = AddPropForcevoid Entity_AddForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem) 
 
 
 = AddPropImpulsevoid Entity_AddImpulse(string& asName, float afX, float afY, float afZ, string& asCoordSystem) 
 
 = AddBodyForcevoid Entity_AddBodyForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem) 
 
 
 = AddBodyImpulsevoid Entity_AddBodyImpulse(string& asName, float afX, float afY, float afZ, string& asCoordSystem) 
 
 
 
 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
 
 
 
 = SetPropObjectStuckStatevoid Entity_SetStuckState(string& asName, int alState) 
 
 
 = SetAllowStickyAreaAttachmentvoid Entity_SetAllowStickyAreaAttachment(bool abX) 
 
 
 = AttachPropToStickyAreavoid Entity_AttachToStickyArea(string& asAreaName, string& asProp) 
 
 
 = AttachBodyToStickyAreavoid Entity_AttachBodyToStickyArea(string& asAreaName, string& asBody) 
 
 
 = DetachFromStickyAreavoid Entity_DetachFromStickyArea(string& asAreaName) 
 MoveObject
 Quote:= SetMoveObjectStatevoid MoveObject_SetState(string& asName, float afState) 
 
 
 void MoveObject_SetStateExt(string& asName, float afState, float afAcc, float afMaxSpeed, float afSlowdownDist, bool abResetSpeed)
= SetMoveObjectStateExt
 Lamp
 Quote:= SetLampLitvoid Entity_SetLampLit(string& asName, bool abLit, bool abEffects) 
 SwingDoor
 Quote:= SetSwingDoorLockedvoid SwingDoor_SetLocked(string& asName, bool abLocked, bool abEffects) 
 
 
 = SetSwingDoorClosedvoid SwingDoor_SetClosed(string& asName, bool abClosed, bool abEffects) 
 
 
 = GetSwingDoorLockedbool SwingDoor_GetLocked(string& asName) 
 
 
 = GetSwingDoorClosedbool SwingDoor_GetClosed(string& asName) 
 
 
 = SetSwingDoorDisableAutoClosevoid SwingDoor_SetDisableAutoClose(string& asName, bool abDisableAutoClose) 
 
 
 = GetSwingDoorStateint SwingDoor_GetState(string& asName) 
 LevelDoor
 Quote:= SetLevelDoorLockedvoid LevelDoor_SetLocked(string& asName, bool abLocked) 
 
 = SetLevelDoorLockedSoundvoid LevelDoor_SetLockedSound(string& asName, string& asSound) 
 
 
 = SetLevelDoorLockedTextvoid LevelDoor_SetLockedText(string& asName, string& asTextCat, string& asTextEntry) 
 Wheel
 Quote:= SetWheelStuckStatevoid Wheel_SetStuckState(string& asName, int alState, bool abEffects) 
 
 
 = SetWheelAnglevoid Wheel_SetAngle(string& asName, float afAngle, bool abAutoMove) 
 
 = SetWheelInteractionDisablesStuckvoid Wheel_SetInteractionDisablesStuck(string& asName, bool abX) 
 Lever
 Quote:= SetLeverStuckStatevoid Lever_SetStuckState(string& asName, int alState, bool abEffects) 
 
 
 = SetLeverInteractionDisablesStuckvoid Lever_SetInteractionDisablesStuck(string& asName, bool abX) 
 
 
 = GetLeverStateint Lever_GetState(string& asName) 
 Button
 Quote:= SetButtonSwitchedOnvoid Button_SetSwitchedOn(string& asName, bool abSwitchedOn, bool abEffects) 
 MultiSlider
 Quote:= SetMultiSliderStuckStatevoid MultiSlider_SetStuckState(string& asName, int alStuckState, bool abEffects) 
 
 
 = SetMultiSliderCallbackvoid MultiSlider_SetCallback(string& asName, string& asCallback) 
 NPC
 Quote:= SetNPCAwakevoid NPC_SetAwake(string& asName, bool abAwake, bool abEffects) 
 
 
 = SetNPCFollowPlayervoid NPC_SetFollowPlayer(string& asName, bool abX) 
 Enemy
 Quote:= SetEnemyDisabledvoid Enemy_SetDisabled(string& asName, bool abDisabled) 
 
 = SetEnemyIsHallucinationvoid Enemy_SetIsHallucination(string& asName, bool abX) 
 
 
 = FadeEnemyToSmokevoid Enemy_FadeToSmoke(string& asName, bool abPlaySound) 
 
 
 = ShowEnemyPlayerPositionvoid Enemy_ShowPlayerPosition(string& asName) 
 
 
 = AlertEnemyOfPlayerPresencevoid Enemy_AlertPlayerPresence(string &in asName) 
 
 
 = SetEnemyDisableTriggersvoid Enemy_SetTriggersDisabled(string& asName, bool abX) 
 
 
 = AddEnemyPatrolNodevoid Enemy_AddPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation) 
 
 = ClearEnemyPatrolNodesvoid Enemy_ClearPatrolNodes(string& asEnemyName) 
 
 
 = SetEnemySanityDecreaseActivevoid Enemy_SetSanityDecreaseActive(string &in asName, bool abX) 
 
 
 = TeleportEnemyToNodevoid Enemy_TeleportToNode(string &in asEnemyName, string &in asNodeName, bool abChangeY) 
 
 = TeleportEnemyToEntityvoid Enemy_TeleportToEntity(string &in asEnemyName, string &in asTargetEntity, string &in asTargetBody, bool abChangeY) 
 
 
 = ChangeManPigPosevoid Enemy_ChangeManPigPose(string&in asName, string&in asPoseType) 
 
 
 = SetTeslaPigFadeDisabledvoid Enemy_SetTeslaPigFadeDisabled(string&in asName, bool abX) 
 
 
 = SetTeslaPigSoundDisabledvoid Enemy_SetTeslaPigSoundDisabled(string&in asName, bool abX) 
 
 
 = SetTeslaPigEasyEscapeDisabledvoid Enemy_SetTeslaPigEasyEscapeDisabled(string&in asName, bool abX) 
 
 
 = ForceTeslaPigSightingvoid Enemy_ForceTeslaPigSighting(string&in asName) 
 
 
 = GetEnemyStateNamestring Enemy_GetStateName(string &in asName) 
 
				
(This post was last modified: 12-03-2018, 06:04 PM by Mudbill.)
 |  |  
	| 10-26-2018, 11:44 PM |  |  
	
		| HappyMatt12345   Junior Member
 
 Posts: 16
 Threads: 6
 Joined: Oct 2018
 Reputation: 
0
 | 
			| RE: Engine Scripts Plus [ES+ 1.2] - More sensical function names 
 
				Looking to use this, the only thing I want to do is add a few custom ones (following the same name convention of course) for your SetLocalVarBool, GetLocalVarBool, SetGlobalVarBool, etc. functions that I am also using.
			 
 
				
(This post was last modified: 12-02-2018, 09:34 AM by HappyMatt12345.)
 |  |  
	| 12-02-2018, 09:33 AM |  |  
	
		| Mudbill   Muderator
 
 Posts: 3,881
 Threads: 59
 Joined: Apr 2013
 Reputation: 
179
 | 
			| RE: Engine Scripts Plus [ES+ 1.2] - More sensical function names 
 
				This by default only includes the main functions, but custom ones are no problem of course    
This would be the code to add for those functions:
 void Script_SetLocalVarBool(string& asName, bool abVal) {SetLocalVarInt(asName, abVal ? 1 : 0);
 }
 
 bool Script_GetLocalVarBool(string& asName) {
 return GetLocalVarInt(asName) != 0;
 }
 
 void Script_SetGlobalVarBool(string& asName, bool abVal) {
 SetGlobalVarInt(asName, abVal ? 1 : 0);
 }
 
 bool Script_GetGlobalVarBool(string& asName) {
 return GetGlobalVarInt(asName) != 0;
 }
 
 |  |  
	| 12-03-2018, 05:21 PM |  |  |