-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDLpndPowerSlideMain.gek
29 lines (25 loc) · 1.31 KB
/
DLpndPowerSlideMain.gek
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
scn DLpndPowerSlideMain
begin function{}
if GetGameLoaded
; Init the config
array_var config = GetINISection "Gameplay" "DLpnd\DLpndPowerSliderSettings.ini" 1
Player.AuxVarSetFLT "*SlidePower" (config["SlidePower"])
Player.AuxVarSetFLT "*SlideKey" (config["SlideKey"])
Player.AuxVarSetFLT "*SlideEndStand" (config["SlideEndStand"])
Player.AuxVarSetFLT "*SlideDelay" (config["SlideDelay"])
Player.AuxVarSetFLT "*SlideDamageAP" (clamp (config["SlideDamageAP"]) 0 100)
Player.AuxVarSetFLT "*PerkPyroEnable" (config["PerkPyroEnable"])
Player.AuxVarSetFLT "*KnockOverTime" (config["KnockOverTime"])
Player.AuxVarSetFLT "*KnockForce" (config["KnockForce"])
; Integrate with other mods
if eval (config["SlideIntegrateJAM"] && (IsModLoaded "JustAssortedMods.esp" || IsModLoaded "JustVanillaSprint.esp"))
Player.AuxVarSetRef "*JVSSprintAnimBaseEffect" (EditorIDToFormID "JVSSprintAnimBaseEffect")
endif
; Init Event Handlers
SetOnKeyDownEventHandler DLpndPowerSlideTriggerHandler 1 (config["SlideKey"])
SetEventHandler "DLpndPowerSlideHandler" DLpndPowerSlideHandler
SetEventHandler "DLpndPowerSlideFormHandler" DLpndPowerSlideFormHandler
; Reset slide on load of the save
Player.AuxVarSetFLT "*_iDLpndSlideStarted" 0
endif
end