Improved killmove switching in effect scripts
This commit is contained in:
parent
59698590b4
commit
7a86fcfb42
BIN
scripts/_00E_KillMove.pex
Normal file
BIN
scripts/_00E_KillMove.pex
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
35
source/scripts/_00E_KillMove.psc
Normal file
35
source/scripts/_00E_KillMove.psc
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
Scriptname _00E_KillMove Hidden
|
||||||
|
|
||||||
|
int Function Off() Global
|
||||||
|
|
||||||
|
GlobalVariable KillMove = Game.GetForm(0x100F19) as GlobalVariable
|
||||||
|
int iPrevValue = KillMove.GetValue() as int
|
||||||
|
|
||||||
|
KillMove.SetValue(0 as float)
|
||||||
|
Utility.SetINIBool("bVATSDisable:VATS", true)
|
||||||
|
|
||||||
|
return iPrevValue
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
int Function On() Global
|
||||||
|
|
||||||
|
GlobalVariable KillMove = Game.GetForm(0x100F19) as GlobalVariable
|
||||||
|
int iPrevValue = KillMove.GetValue() as int
|
||||||
|
|
||||||
|
KillMove.SetValue(1 as float)
|
||||||
|
Utility.SetINIBool("bVATSDisable:VATS", false)
|
||||||
|
|
||||||
|
return iPrevValue
|
||||||
|
|
||||||
|
EndFunction
|
||||||
|
|
||||||
|
int function SetValue(bool bValue) Global
|
||||||
|
|
||||||
|
if bValue
|
||||||
|
return On()
|
||||||
|
else
|
||||||
|
return Off()
|
||||||
|
endif
|
||||||
|
|
||||||
|
endfunction
|
@ -8,12 +8,11 @@ Import _00E_TalentLibrary
|
|||||||
|
|
||||||
Event onEffectStart(Actor akTarget, Actor akCaster)
|
Event onEffectStart(Actor akTarget, Actor akCaster)
|
||||||
|
|
||||||
|
|
||||||
if ((akTarget.GetLevel() - (PlayerLevel.GetValueInt())) > 4) || (akTarget.HasKeyword(MagicNoFreeze)) ; Debug only!
|
if ((akTarget.GetLevel() - (PlayerLevel.GetValueInt())) > 4) || (akTarget.HasKeyword(MagicNoFreeze)) ; Debug only!
|
||||||
_00E_A1_ArcticWind_sEnemyTooPowerful.Show()
|
_00E_A1_ArcticWind_sEnemyTooPowerful.Show()
|
||||||
Else
|
Else
|
||||||
akTarget.AddSpell(_00E_A1_ArcticWindFrozenAb)
|
akTarget.AddSpell(_00E_A1_ArcticWindFrozenAb)
|
||||||
KillMove.SetValueInt(0)
|
iKillMove = _00E_KillMove.Off()
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
EndEvent
|
EndEvent
|
||||||
@ -21,9 +20,7 @@ EndEvent
|
|||||||
Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
||||||
|
|
||||||
akTarget.RemoveSpell(_00E_A1_ArcticWindFrozenAb)
|
akTarget.RemoveSpell(_00E_A1_ArcticWindFrozenAb)
|
||||||
If Utility.GetINIBool("bVATSDisable:VATS") == 0
|
_00E_KillMove.SetValue(iKillMove)
|
||||||
KillMove.SetValueInt(1)
|
|
||||||
EndIf
|
|
||||||
|
|
||||||
EndEvent
|
EndEvent
|
||||||
|
|
||||||
@ -32,6 +29,8 @@ EndEvent
|
|||||||
; PROPERTIES
|
; PROPERTIES
|
||||||
;=====================================================================================
|
;=====================================================================================
|
||||||
|
|
||||||
|
int iKillMove
|
||||||
|
|
||||||
Actor Property PlayerREF Auto
|
Actor Property PlayerREF Auto
|
||||||
|
|
||||||
Spell Property _00E_A1_ArcticWindFrozenAb Auto
|
Spell Property _00E_A1_ArcticWindFrozenAb Auto
|
||||||
@ -43,4 +42,3 @@ GlobalVariable Property KillMove Auto
|
|||||||
Keyword Property MagicNoFreeze Auto
|
Keyword Property MagicNoFreeze Auto
|
||||||
|
|
||||||
GlobalVariable Property PlayerLevel Auto
|
GlobalVariable Property PlayerLevel Auto
|
||||||
|
|
||||||
|
@ -21,8 +21,7 @@ Event OnEffectStart(Actor akTarget, Actor akCaster)
|
|||||||
fDurationFailsave = _00E_A2_EyeOfTheStormSP.GetNthEffectDuration(iDurationIndex)
|
fDurationFailsave = _00E_A2_EyeOfTheStormSP.GetNthEffectDuration(iDurationIndex)
|
||||||
iSound = MAGShoutSlowTimeActive02LP.Play(PlayerREF)
|
iSound = MAGShoutSlowTimeActive02LP.Play(PlayerREF)
|
||||||
PlayerREF.PlaceAtMe(_00E_A2_EyeOfTheStormFailsaveExp, 1)
|
PlayerREF.PlaceAtMe(_00E_A2_EyeOfTheStormFailsaveExp, 1)
|
||||||
iKillMoveConfig = KillMove.GetValueInt()
|
iKillMoveConfig = _00E_KillMove.Off()
|
||||||
KillMove.SetValueInt(0)
|
|
||||||
akCaster.AddSpell(_00E_A2_EyeOfTheStormAb, False)
|
akCaster.AddSpell(_00E_A2_EyeOfTheStormAb, False)
|
||||||
RegisterForSingleUpdate(fDurationFailsave)
|
RegisterForSingleUpdate(fDurationFailsave)
|
||||||
|
|
||||||
@ -41,7 +40,7 @@ Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
|||||||
|
|
||||||
if (PlayerREF.HasSpell(_00E_A2_EyeOfTheStormAb))
|
if (PlayerREF.HasSpell(_00E_A2_EyeOfTheStormAb))
|
||||||
Sound.StopInstance(iSound)
|
Sound.StopInstance(iSound)
|
||||||
KillMove.SetValueInt(iKillMoveConfig)
|
_00E_KillMove.SetValue(iKillMoveConfig)
|
||||||
akCaster.RemoveSpell(_00E_A2_EyeOfTheStormAb)
|
akCaster.RemoveSpell(_00E_A2_EyeOfTheStormAb)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ Import _00E_TalentLibrary
|
|||||||
|
|
||||||
Event OnEffectStart(Actor Target, Actor Caster)
|
Event OnEffectStart(Actor Target, Actor Caster)
|
||||||
|
|
||||||
KillMove.SetValueInt(0)
|
iKillMove = _00E_KillMove.Off()
|
||||||
AudioCategoryPausedDuringMenu.Mute()
|
AudioCategoryPausedDuringMenu.Mute()
|
||||||
_00E_A2_EyeOfTheStormIMOD.Apply()
|
_00E_A2_EyeOfTheStormIMOD.Apply()
|
||||||
|
|
||||||
@ -17,9 +17,7 @@ EndEvent
|
|||||||
|
|
||||||
Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
||||||
|
|
||||||
If Utility.GetINIBool("bVATSDisable:VATS") == 0
|
_00E_KillMove.SetValue(iKillMove)
|
||||||
KillMove.SetValueInt(1)
|
|
||||||
EndIf
|
|
||||||
_00E_A2_EyeOfTheStormIMOD.Remove()
|
_00E_A2_EyeOfTheStormIMOD.Remove()
|
||||||
AudioCategoryPausedDuringMenu.UnMute()
|
AudioCategoryPausedDuringMenu.UnMute()
|
||||||
|
|
||||||
@ -30,6 +28,8 @@ EndEvent
|
|||||||
; PROPERTIES
|
; PROPERTIES
|
||||||
;=====================================================================================
|
;=====================================================================================
|
||||||
|
|
||||||
|
int iKillMove
|
||||||
|
|
||||||
ImagespaceModifier Property _00E_A2_EyeOfTheStormIMOD Auto
|
ImagespaceModifier Property _00E_A2_EyeOfTheStormIMOD Auto
|
||||||
|
|
||||||
Actor Property PlayerREF Auto
|
Actor Property PlayerREF Auto
|
||||||
|
@ -17,7 +17,7 @@ EndEvent
|
|||||||
|
|
||||||
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
||||||
|
|
||||||
KillMove.SetValue(0)
|
iKillMove = _00E_KillMove.Off()
|
||||||
MAGPowerRacialHitskinM.Play(PlayerREF)
|
MAGPowerRacialHitskinM.Play(PlayerREF)
|
||||||
AudioCategorySFXDeath.Mute()
|
AudioCategorySFXDeath.Mute()
|
||||||
PlayerREF.GetActorBase().SetEssential(True)
|
PlayerREF.GetActorBase().SetEssential(True)
|
||||||
@ -29,14 +29,10 @@ Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
|||||||
|
|
||||||
AudioCategorySFXDeath.UnMute()
|
AudioCategorySFXDeath.UnMute()
|
||||||
PlayerREF.GetActorBase().SetEssential(False)
|
PlayerREF.GetActorBase().SetEssential(False)
|
||||||
UnregisterForUpdate()
|
_00E_KillMove.SetValue(iKillMove)
|
||||||
|
|
||||||
EndEvent
|
EndEvent
|
||||||
|
|
||||||
Event OnUpdate()
|
|
||||||
|
|
||||||
|
|
||||||
EndEvent
|
|
||||||
|
|
||||||
;=====================================================================================
|
;=====================================================================================
|
||||||
; FUNCTIONS
|
; FUNCTIONS
|
||||||
@ -100,6 +96,7 @@ EndFunction
|
|||||||
; PROPERTIES
|
; PROPERTIES
|
||||||
;=====================================================================================
|
;=====================================================================================
|
||||||
|
|
||||||
|
int iKillMove
|
||||||
float iTriggerHealthPercentage
|
float iTriggerHealthPercentage
|
||||||
|
|
||||||
Explosion Property _00E_A2_WellOfLifeExplosionVisual Auto
|
Explosion Property _00E_A2_WellOfLifeExplosionVisual Auto
|
||||||
|
@ -2,20 +2,18 @@ Scriptname _00E_DisableKillMovesSC extends ObjectReference
|
|||||||
|
|
||||||
Event OnTriggerEnter(ObjectReference akActionRef)
|
Event OnTriggerEnter(ObjectReference akActionRef)
|
||||||
|
|
||||||
if akActionRef == Game.GetPlayer()
|
if akActionRef == Game.GetForm(0x14)
|
||||||
KillMove.SetValueInt(0)
|
iKillMove = _00E_KillMove.Off()
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
EndEvent
|
EndEvent
|
||||||
|
|
||||||
Event OnTriggerLeave(ObjectReference akActionRef)
|
Event OnTriggerLeave(ObjectReference akActionRef)
|
||||||
|
|
||||||
if akActionRef == Game.GetPlayer()
|
if akActionRef == Game.GetForm(0x14)
|
||||||
If Utility.GetINIBool("bVATSDisable:VATS") == 0
|
_00E_KillMove.SetValue(iKillMove)
|
||||||
KillMove.SetValueInt(1)
|
|
||||||
EndIf
|
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
EndEvent
|
EndEvent
|
||||||
|
|
||||||
GlobalVariable Property KillMove Auto
|
int iKillMove
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Scriptname _00E_EPHandler
|
Scriptname _00E_EPHandler Hidden
|
||||||
|
|
||||||
Function GiveEP(int ToGive) Global
|
Function GiveEP(int ToGive) Global
|
||||||
|
|
||||||
|
@ -449,18 +449,6 @@ Function DijaamAttackPlayer()
|
|||||||
|
|
||||||
EndFunction
|
EndFunction
|
||||||
|
|
||||||
Function ToggleKillmoves()
|
|
||||||
|
|
||||||
if KillMove.GetValue() == 1
|
|
||||||
bKillMovesDeactivated = true
|
|
||||||
KillMove.SetValue(0)
|
|
||||||
ElseIf KillMove.GetValue() == 0 && bKillMovesDeactivated == true
|
|
||||||
bKillMovesDeactivated = false
|
|
||||||
KillMove.SetValue(1)
|
|
||||||
EndIf
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Function DijaamLeave()
|
Function DijaamLeave()
|
||||||
|
|
||||||
FadeToBlackIMOD.Apply()
|
FadeToBlackIMOD.Apply()
|
||||||
|
@ -23,7 +23,7 @@ EndFunction
|
|||||||
;BEGIN FRAGMENT Fragment_7
|
;BEGIN FRAGMENT Fragment_7
|
||||||
Function Fragment_7()
|
Function Fragment_7()
|
||||||
;BEGIN CODE
|
;BEGIN CODE
|
||||||
NQ_G_07.ToggleKillmoves()
|
; 2.1: toggling killmove removed
|
||||||
;END CODE
|
;END CODE
|
||||||
EndFunction
|
EndFunction
|
||||||
;END FRAGMENT
|
;END FRAGMENT
|
||||||
|
Loading…
Reference in New Issue
Block a user