2021-10-06 00:15:58 +02:00
|
|
|
Scriptname _00E_PlayerSetUpScript extends ObjectReference
|
2023-11-28 19:31:31 +01:00
|
|
|
{Initializes player's actor values}
|
2021-10-06 00:15:58 +02:00
|
|
|
|
2023-10-26 21:22:14 +02:00
|
|
|
int function _GetScriptVersion() Global
|
|
|
|
return 1
|
|
|
|
endFunction
|
2021-10-06 00:59:59 +02:00
|
|
|
|
2021-10-06 00:15:58 +02:00
|
|
|
;=====================================================================================
|
|
|
|
; EVENTS
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Event OnInit()
|
2023-11-28 19:31:31 +01:00
|
|
|
|
2021-12-15 07:49:12 +01:00
|
|
|
PlayerREF.SetActorValue("speedMult", 95)
|
|
|
|
PlayerREF.SetActorValue("Healrate", 0)
|
2021-10-06 00:15:58 +02:00
|
|
|
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnPlayerLoadGame()
|
2021-11-29 03:47:56 +01:00
|
|
|
|
2021-10-06 00:15:58 +02:00
|
|
|
; changes to the actor value healrate will not persist in consecutive saves
|
|
|
|
; every time a save gets loaded the healrate needs to be set to 0, otherwise it will go back again to default at 0.7
|
|
|
|
; this is called before active magic effects of potions or spells are applied to the player which could also alter the value
|
|
|
|
PlayerREF.SetActorValue("Healrate", 0)
|
2021-12-29 22:20:10 +01:00
|
|
|
|
|
|
|
; Workaround for broken physics on loading saves, made on a mount
|
|
|
|
If PlayerREF.IsOnMount()
|
|
|
|
PlayerREF.Dismount()
|
|
|
|
EndIf
|
|
|
|
|
2023-11-28 19:31:31 +01:00
|
|
|
EndEvent
|
2021-10-06 00:15:58 +02:00
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; PROPERTIES
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Actor Property PlayerREF Auto
|