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
return 1
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
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_CombatMusicControl function GetCombatMusicControl() Global
return (Game.GetForm(0x14) as _00E_PlayerFunctions).ControlRepository.CombatMusicControl
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