Hi,
Sometimes, enemies affected by Arctic Wind neither shatter nor go back to normal. Instead, their bodies remain intact but motionless, and it's no longer possible to interact with those enemies (cannot be looted, etc). I posted a video of the bug in action here: https://forum.sureai.net/viewtopic.php?f=208&t=13159
The reason why this bug only happens sometimes has to do with the following script: _00E_FrozenMEScript
According to this script, an oppoent who has been frozen solid due to Arctic Wind may shatter in two possible situations:
1) if, after hitting him, his HP reaches zero.
2) if, after hitting him, his 'shattering chance' exceeds a certain threshold.
I'm going to argue that the bug with Arctic Wind only occurs in situation 2. Let's take a look at the code:
This is the code that covers situation 1 (the one that is not bugged):
This is the code that covers situation 2 (the one that is bugged):
See the problem in situation 2? If the 'ShatterChance' exceeds a certain value, the script executes the 'ShatterEnemy()' function and, after that, it goes to the 'Finished' state. The problem is that neither the 'Finished' state nor the 'ShatterEnemy()' function contain the necessary code to make the frozen enemy shatter. The 'ShatterEnemy()' function kills the frozen enemy (FrozenActor.Kill(PlayerREF), but it is missing the explosions, alpha channel correction and disintegration effects that create the illusion that the opponent is turned into ice cubes.
If you expand the 'ShatterEnemy()' function so that it looks like this, the bug with Arctic Wind disappears:
Having said that, this is not a perfect fix. Mechanically it works, but visually it's not perfect. In particular, I couldn't get the body to become invisible (via alpha correction) fast enough. So the result is that the explosion kicks in, but the body is visible a second too long, which breaks the illusion that the body has turned into ice cubes. See here: https://filebin.net/7cte0j5ypz27ybzx
If you are fine with this shortcoming, find the edited script and the source code below. My hope however is that an Enderal dev will see this thread and improve on my fix, getting rid of the visual oddities.
https://filebin.net/ryx47eoxlaj6s532
Thanks in advance!
Sometimes, enemies affected by Arctic Wind neither shatter nor go back to normal. Instead, their bodies remain intact but motionless, and it's no longer possible to interact with those enemies (cannot be looted, etc). I posted a video of the bug in action here: https://forum.sureai.net/viewtopic.php?f=208&t=13159
The reason why this bug only happens sometimes has to do with the following script: _00E_FrozenMEScript
According to this script, an oppoent who has been frozen solid due to Arctic Wind may shatter in two possible situations:
1) if, after hitting him, his HP reaches zero.
2) if, after hitting him, his 'shattering chance' exceeds a certain threshold.
I'm going to argue that the bug with Arctic Wind only occurs in situation 2. Let's take a look at the code:
This is the code that covers situation 1 (the one that is not bugged):
Code Select all
if FrozenActor.GetAV("Health") < 1
FrozenActor.PlaceAtMe(_00E_FrostShatteringExplosion02)
if FrozenActor.HasKeyword(ActorTypeNPC) || FrozenActor.GetRace() == DraugrRace
FrozenActor.PlaceAtMe(_00E_FS_MAGIceGoreExplosion)
Else
FrozenActor.PlaceAtMe(_00E_FrostShatteringExplosion)
EndIf
FrozenActor.SetAlpha (0.0, true)
FrozenActor.SetCriticalStage(FrozenActor.CritStage_DisintegrateStart)
FrozenActor.AttachAshPile(_00E_ShatteredEnemyPile)
WPNImpactBladeVsIce.Play(FrozenActor)
Game.ShakeCamera(afStrength = 0.3)
Utility.Wait(0.5)
FrozenActor.SetCriticalStage(FrozenActor.CritStage_DisintegrateEnd)
Code Select all
If Utility.RandomFloat() < ShatterChance
; Debug.MessageBox("Shatter!")
HasBeenShattered = true
ShatterEnemy()
GoToState("Finished")
EndIf
Code Select all
Function ShatterEnemy()
FrozenActor.Kill(PlayerREF)
EndFunctionCode Select all
State Finished
; Do nothing
EndStateIf you expand the 'ShatterEnemy()' function so that it looks like this, the bug with Arctic Wind disappears:
Code Select all
Function ShatterEnemy()
FrozenActor.PlaceAtMe(_00E_FrostShatteringExplosion02)
if FrozenActor.HasKeyword(ActorTypeNPC) || FrozenActor.GetRace() == DraugrRace
FrozenActor.PlaceAtMe(_00E_FS_MAGIceGoreExplosion)
Else
FrozenActor.PlaceAtMe(_00E_FrostShatteringExplosion)
EndIf
FrozenActor.Kill(PlayerREF)
FrozenActor.SetAlpha (0.0, true)
FrozenActor.SetCriticalStage(FrozenActor.CritStage_DisintegrateStart)
FrozenActor.AttachAshPile(_00E_ShatteredEnemyPile)
WPNImpactBladeVsIce.Play(FrozenActor)
Game.ShakeCamera(afStrength = 0.3)
Utility.Wait(0.5)
FrozenActor.SetCriticalStage(FrozenActor.CritStage_DisintegrateEnd)
EndFunctionIf you are fine with this shortcoming, find the edited script and the source code below. My hope however is that an Enderal dev will see this thread and improve on my fix, getting rid of the visual oddities.
https://filebin.net/ryx47eoxlaj6s532
Thanks in advance!
Thanks, good find. I've adjusted the script in a way that the visiual problem shouldn't occur with your fix. Calling Kill() and SetAlpha() directly after each other was the problem according to my testing.
Code Select all
Function ShatterEnemy()
FrozenActor.Kill(PlayerREF)
Utility.Wait(0.1)
FrozenActor.PlaceAtMe(_00E_FrostShatteringExplosion02)
if FrozenActor.HasKeyword(ActorTypeNPC) || FrozenActor.GetRace() == DraugrRace
FrozenActor.PlaceAtMe(_00E_FS_MAGIceGoreExplosion)
Else
FrozenActor.PlaceAtMe(_00E_FrostShatteringExplosion)
EndIf
FrozenActor.SetAlpha (0.0, true)
FrozenActor.SetCriticalStage(FrozenActor.CritStage_DisintegrateStart)
FrozenActor.AttachAshPile(_00E_ShatteredEnemyPile)
WPNImpactBladeVsIce.Play(FrozenActor)
Game.ShakeCamera(afStrength = 0.3)
Utility.Wait(0.5)
FrozenActor.SetCriticalStage(FrozenActor.CritStage_DisintegrateEnd)
EndFunction

