Helper functions interfacing with game module objects
int Description_AddExt(const tString &in asTextCat, const tString &in asTextEntry, float afTimeMul, bool abPutInQueueIfShowing, bool abConnectedToPrevious, eDescEffect aEffect, float afEffectAmount, cColor aColor)
int Description_Add(const tString &in asTextCat, const tString &in asTextEntry, float afTimeMul, bool abPutInQueueIfShowing)
bool Description_IsActive()
int Description_GetCurrentId()
void Description_SetForceFading(bool abX)
void TerrainParticles_Disable()
Disables terrain particles, they have to be setup again to be started
void TerrainParticles_SetupRange(float afRangeMinStart, float afRangeMinEnd, float afRangeMaxStart, float afRangeMaxEnd)
Sets up the maximum and minimum distance that the particles are visible Particles also wrap around the maximum distance, coming out on the other side if they get to far away This should be called before spawning particles to get the best spread
void TerrainParticles_SetupParticles(const tString &in asMaterial, int alFixedAxisCount, float afFixedAxisSizeMin, float afFixedAxisSizeMax, cColor avFixedColorMin, cColor avFixedColorMax, int alPointSpriteCount, float afPointSpriteSizeMin, float afPointSpriteSizeMax, cColor avPointColorMin, cColor avPointColorMax)
Spawn particles that use the specified material There are two kind of particles. FixedAxis sprites follow the rotation of the surface. PointSprite always look at the player.
void TerrainParticles_SetupForces(const cVector3f &in avVelocityLimit, float afGravityAmount, float afRandomDirectionForce, float afRandomDirectionFrequency)
Setup forces that affect the particles
void TerrainParticles_SetupWind(const cVector3f &in avWindForce)
Setup wind force that is applied to all particles
void DistortionEffect_AddInstance(tID a_idEntity, float afMaxDistance, float afMinDistance, float afMaxAmount, eEasing aEasing=eEasing_Linear)
Adds the entity has an instance that will help create a distortion effect if the player is near enough.
void DistortionEffect_RemoveInstance(tID a_idEntity)
Removes an instance that will create the distortion effect.
int LightFlash_Add(float afTime, float afFadeInTime, float afFadeOutTime, const tString &in asTargetEntity, const cColor &in aColor, float afRadius, float afBrightness)
Creates a flash of light at the postion of an entity. Returns id of the flash.
int LightFlash_Add(float afTime, float afFadeInTime, float afFadeOutTime, const cVector3f &in avTargetPos, const cColor &in aColor, float afRadius, float afBrightness)
Creates a flash of light at the postion of an entity. Returns id of the flash.
bool ToolHandler_CanPickOrUseTool()
Checks if it is OK to use an item or picking one up. Basically just wanna make sure the tool handler (or something else) is not playing an animation (apart form idle)
bool ToolHandler_CanEquipToolAreaTool()
Meant for tool area. Does a check to see if it is OK to equip the tool in that area.
bool ToolHandler_GetPlayerCarriesHeavyTool()
Checks if the player carries a tool that is heavy
bool ToolHandler_IsActive()
Is active?
void ToolHandler_SetActive(bool abX)
void AttackMeter_AddInstance(tID a_idEntity, float afStartDistance, float afEndDistance, float afDamage, bool abFatal=false, bool abFastNonLookKill=false, bool abInstantKnockOut=false)
Adds an entity as something that is about to damage the player.
void AttackMeter_RemoveInstance(tID a_idEntity)
Removes an entity as something that is about to damage the player.
void AttackMeter_AutoDamage(float afTime, float afDamage, bool abFatal)
This starts a timer that will damage the player when it is over.
bool AttackMeter_IsActive()
Checks if any effects are active
void AttackMeter_SetPlayerIsRecovering(bool abX)
Manually set that the player is in recovery mode as if he has just been attacked. While true, most Agents refrain from attacking and player cannot get knocked down.
bool AttackMeter_GetPlayerIsRecovering()
Check if the attack meter has just damaged the player and the player currently have the effects caused by that.
void AttackMeter_SetCustomDamageCallback(const tString &in asCallback)
This lets you do your own damage event. Nothing is done in the AttackHandler when damage is to occurs except calling this.
void AttackMeter_SetAfterDamageCallback(const tString &in asCallback)
This sets a callback that is called after taken daming.
void AttackMeter_SetAttackerTeleportPosition(const tString &in asPosition)
If the player blacks out when damaged the agent that hurt him will be telported to one of these postions.
tString AttackMeter_GetAttackerTeleportPosition()
Gets the base name (with wildcards) that was set with AttackMeter_SetAttackerTeleportPosition
void AttackMeter_BreakAttackDamageSequence()
Only to be called in _Global_PlayerAfterDamageCallback of an Agent or in an AfterDamageCallback. It breaks the sequence to continue. The following things will be changed WorldAll volume to 0, player move & look speed, effect fade out, and PlayerIsRecovering is true.
void AttackMeter_ContinueAttackDamageSequence()
Only to be called after _Global_PlayerAfterDamageCallback of an Agent or in an AfterDamageCallback if AttackMeter_BreakAttackDamageSequence has been called. This simple continue this
float AttackMeter_GetTimeSinceLastKnockDown()
Time since player was last knocked down.
void GameOver_Start(const tString &in asDeathSource)
Starts the Game Over screen
void GameOver_End()
Ends the Game Over screen
float GameOver_GetTimeSinceLastGameOver()
Ends the Game Over screen
void GameOver_SetCustomGameOverScreenText(const tString &in asCat, const tString &in asEntry)
Sets the message that will be displayed before a checkpoint is loaded (after proper death):
int Emotion_StartHeartbeat(float afTimeBetweenBeats, float afVolume, int alPrio, float afDuration=-1, float afFadeInTime=3, float afFadeOutTime=3)
Starts a new instance of heart beats
void Emotion_StopHeartbeat(int alId)
Stops an instance of heart beats.
void Emotion_SetHeartbeatProperties(int alId, float afTimeBetweenBeats, float afVolume)
Changes the properties for heart beat instance
int Emotion_StartBackgroundBreath(eBreathType aType, float afStrength, int alPrio, float afDuration=-1, float afFadeInSpeed=0.2f, float afFadeOutSpeed=0.2f)
Starts a new instance of background breathing. Returns ID of the instnace.
void Emotion_StopBackgroundBreath(int alID)
Stops an instance of background breathing.
void Emotion_SetBackgroundBreathMuted(int alID, bool abX)
Sets an instance of background breathing muted. Note that this muting only works if the is the top prio instnace and in that case no other instance will play either.
void Emotion_PlayEventBreath(const tString &in asSound, int alPrio=1)
Plays an event breathing sound.
void Wake_SetAsleep(bool abAsleep)
Puts the player instantly to sleep (or awake)
void Wake_StartWakeup(float afTime)
Wakes up the player.
void PauseMenu_Enabled(bool abActive)
Sets if the pause menu is allowed to be used
void PauseMenu_Show(bool abActive)
Show the pause manu
void MainMenu_Show(bool abX)
If main menu should be shown
bool MainMenu_IsShowing()
Return whether the Main Menu is active or not
void MainMenu_GameOver()
Returning to the main menu when the game's complete
void MainMenu_SetBGPhase(eMainMenuPhase aPhase)
Change main menu BG state
void MainMenu_SetIsE3Demo()
void LastOnSoma_SetText(const tString &in asText)
void Hint_ShowHint(const tString &in asTextCat, const tString &in asTextEntry, bool abIsInputHint=false, float afTimeMul=1.5f, bool abAddAsGiven=true)
int Hint_ShowHint_Hold(const tString &in asTextCat, const tString &in asTextEntry, bool abIsInputHint=false, float afTimeMul=1.5f, bool abAddAsGiven=true)
void Hint_ShowInfo(const tString &in asTextCat, const tString &in asTextEntry, bool abIsInputHint=false, float afTimeMul=1.5f, bool abAddAsGiven=true)
int Hint_ShowInfo_Hold(const tString &in asTextCat, const tString &in asTextEntry, bool abIsInputHint=false, float afTimeMul=1.5f, bool abAddAsGiven=true)
void Hint_ShowDanger(const tString &in asTextCat, const tString &in asTextEntry, bool abIsInputHint=false, float afTimeMul=1.5f, bool abAddAsGiven=true)
int Hint_ShowDanger_Hold(const tString &in asTextCat, const tString &in asTextEntry, bool abIsInputHint=false, float afTimeMul=1.5f, bool abAddAsGiven=true)
void Hint_ShowAlert(const tString &in asTextCat, const tString &in asTextEntry, bool abIsInputHint=false, float afTimeMul=1.5f, bool abAddAsGiven=true)
int Hint_ShowAlert_Hold(const tString &in asTextCat, const tString &in asTextEntry, bool abIsInputHint=false, float afTimeMul=1.5f, bool abAddAsGiven=true)
void Hint_Show_Helper(const tString &in asHeaderEntry, const tString &in asTextCat, const tString &in asTextEntry, bool abIsInputHint, const cColor &in aColor, float afTimeMul, bool abAddAsGiven)
int Hint_Show_Ext(const tString &in asHeaderCat, const tString &in asHeaderEntry, const tString &in asTextCat, const tString &in asTextEntry, bool abIsInputHint, const cColor &in aColor, float afTimeMul, bool abAddAsGiven)
void Hint_Release(int alID)
void Hint_StopHint()
void Hint_AddAsGiven(int alID)
void Hint_AddAsGiven(const tString &in asCat, const tString &in asEntry)
void Infection_CreateBorderTree(int alBorder, float afOffset, const cVector2f &in avSize, float afSpeed)
Creates an infection tree at a border of the screen
void Infection_ClearTrees()
Clears all created trees.
float PlayerEnergy_GetMoveMul()
float PlayerEnergy_GetLookMul()
void PlayerEnergy_SetFlowerSwallows(bool abX)
void PlayerEnergy_SetAllowCathComment(bool abX)
void Inventory_AutoEnable(float afTime)
This really means 'show the inventory!' but too late to rename now.
void Inventory_SetEnabled(bool abEnabled)
Disables/enables the 'show inventory' key.
void PlayerHands_SetHandModel(const tString &in asFile)
void PlayerHands_SetHandModel_Human()
void PlayerHands_SetHandModel_Diving()
void PlayerHands_SetHandModel_DeepSea()
void PlayerHands_SetHandModel_DeepSeaMutilated()
void PlayerHands_PreloadHandModel(const tString &in asFile)
void PlayerHands_PreloadHandModel_Human()
void PlayerHands_PreloadHandModel_Diving()
void PlayerHands_PreloadHandModel_DeepSea()
void PlayerHands_PreloadHandModel_DeepSeaMutilated()
void PlayerHands_PlayAnimation(const tString &in asAnim, bool abLoop=false, bool abFullScaleModel=false, float afFadeTime=0.0f, const tString &in asAttachedProp="", bool abDisableWhenOver=true, float afSpeed=1, float afRelTimePos=-1)
bool PlayerHands_GetAnimationPlaying()
void PlayerHands_SetActive(bool abX)
bool PlayerHands_IsActive()
void PlayerHands_SetUseCustomRotation(bool abX)
void PlayerHands_SetCustomRotation(const cVector3f &in avRot)
void PlayerHands_SetCustomRotationFromEntity(const tString &in asEntityName)
void PlayerHands_SetUseCustomPosition(bool abX)
void PlayerHands_SetCustomPosition(const cVector3f &in avPos, bool abUseBasicOffset)
void PlayerHands_SetCustomPositionFromEntity(const tString &in asEntityName)
cBoneState PlayerHands_GetBoneState(const tString &in asBone)
cNode3D PlayerHands_GetSocket(const tString &in asSocket)
cAnimationState PlayerHands_GetCurrentAnimationState()
void PlayerHands_AttachCameraToSocket(const tString &in asBoneName, float afFadeTime, const tString &in asFadeOverCallback, bool abDisablePlayer=false, bool abAutoDetach=false, float afDetachTime=1.0f, const cVector3f &in avPosOffset=0, const cVector3f &in avRotOffset=0)
void PlayerHands_DetachCameraFromSocket(float afFadeTime)
void PlayerHands_SetAnimationOverCallback(const tString &in asFunction)
void PlayerHands_SetVisible(bool abX)
tString PlayerHands_GetEntityName()
void LoadScreen_SetBackground(const tString &in asTexture)
Sets the background texture used by the loading screen
void LoadScreen_SetForceBackground(bool abX)
Sets if you want to force showing the background.
void LoadScreen_SetIcon(const tString &in asFirstFrame, int alFrameNum)
Sets the icon used by the loading screen when loading or saving
void LoadScreen_SetUseSmallIcon(bool abX)
If fullscreen icon should be used or if it should be shown in the bottom right corner
bool LoadScreen_IsVisible()
void LoadScreen_ShowLoadingIcon(float afTimeMax=10.0f)
void Credits_Start(const tString &in asCreditsFile, const tString &in asCompleteCallback="", float afRollSpeedStart=0.00f, float afRollSpeedGoal=0.008f, float afRollSpeedFadeTime=1.0f)
Starts the credits screen
void Credits_SetRollSpeed(float afGoal, float afFadeTime)
Changes rolling speed
void Credits_Stop(float afFadeTime=0.0f)
Dismisses the credits screen