2024-01-09 22:00:18 +00:00
Scriptname _00E_PlayerFunctions extends Actor
_00E_EnderalControls Property ControlRepository Auto
Float fDefaultHeadTrackTimerOldValue = 0.0
Float fStayHeadTrackTimerOldValue = 0.0
int function _GetScriptVersion() Global
2024-07-31 13:45:26 +00:00
return 2
2024-01-09 22:00:18 +00:00
endFunction
Event OnInit()
fDefaultHeadTrackTimerOldValue = Game.GetGameSettingFloat("fAIHoldDefaultHeadTrackTimer")
fStayHeadTrackTimerOldValue = Game.GetGameSettingFloat("fAIStayonScriptHeadtrack")
if ControlRepository == None
ControlRepository = Game.GetForm(0x493C2) as _00E_EnderalControls
endif
EndEvent
Event OnPlayerLoadGame()
if ControlRepository == None
ControlRepository = Game.GetForm(0x493C2) as _00E_EnderalControls
endif
2024-07-30 02:48:26 +00:00
2024-07-31 13:13:57 +00:00
; Restore INI values changed by Entropic Blood
if Utility.GetINIFloat("fInAirFallingCharGravityMult:Havok") < 1.0
2024-07-30 02:48:26 +00:00
Utility.SetINIFloat("fInAirFallingCharGravityMult:Havok", 1.35)
endif
2024-07-31 13:13:57 +00:00
if Utility.GetINIFloat("fActivatePickLength:Interface") >= 1799.0
Utility.SetINIFloat("fActivatePickLength:Interface", 150.0)
endif
2024-01-09 22:00:18 +00:00
EndEvent
_00E_SkillControl function GetSkillControl() Global
return (Game.GetForm(0x14) as _00E_PlayerFunctions).ControlRepository.SkillControl
endfunction
_00E_SympathyControl function GetSympathyControl() Global
return (Game.GetForm(0x14) as _00E_PlayerFunctions).ControlRepository.SympathyControl
endfunction
_00E_SoundControl function GetSoundControl() Global
return (Game.GetForm(0x14) as _00E_PlayerFunctions).ControlRepository.SoundControl
endfunction
_00E_VisionControl function GetVisionControl() Global
return (Game.GetForm(0x14) as _00E_PlayerFunctions).ControlRepository.VisionControl
endfunction
_00E_FadeToBlackControl function GetFadeToBlackControl() Global
return (Game.GetForm(0x14) as _00E_PlayerFunctions).ControlRepository.FadeToBlackControl
endfunction
_00E_TeleportControl function GetTeleportControl() Global
return (Game.GetForm(0x14) as _00E_PlayerFunctions).ControlRepository.TeleportControl
endfunction
_00E_SafeItemRemove function GetSafeItemRemove() Global
return (Game.GetForm(0x14) as _00E_PlayerFunctions).ControlRepository.SafeItemRemove
endfunction
_00E_BrawlControl function GetBrawlControl() Global
return (Game.GetForm(0x14) as _00E_PlayerFunctions).ControlRepository.BrawlControl
endfunction
2024-01-10 17:34:07 +00:00
_00E_MiningControl function GetMiningControl() Global
return (Game.GetForm(0x14) as _00E_PlayerFunctions).ControlRepository.MiningControl
endfunction
2024-02-05 00:33:58 +00:00
_00E_DigControl function GetDigControl() Global
return (Game.GetForm(0x14) as _00E_PlayerFunctions).ControlRepository.DigControl
endfunction
2024-01-09 22:00:18 +00:00
;=====================================================================================
; Stop/restart random headtracking
;=====================================================================================
Function StopRandomHeadTracking()
; Raise "change headtrack target" timers a lot so the NPCs would stare at what the scene tells them, without randomly switching to the player or other NPCs
Game.SetGameSettingFloat("fAIHoldDefaultHeadTrackTimer", 1000.0)
Game.SetGameSettingFloat("fAIStayonScriptHeadtrack", 1000.0)
EndFunction
Function ResumeRandomHeadTracking()
Game.SetGameSettingFloat("fAIHoldDefaultHeadTrackTimer", fDefaultHeadTrackTimerOldValue)
Game.SetGameSettingFloat("fAIStayonScriptHeadtrack", fStayHeadTrackTimerOldValue)
EndFunction