Hello everyone,
I'm currently at the end of my wits with this script. It is part of a script from a spell which creates a magical orb that unleashes one of five possible effects. In order to accomplish that, I scripted this:
int Effect = Utility.RandomInt(0, 100)
Debug.Notification("Random value is" + Effect)
Wait(3)
;---------------DETERMINE EFFECT---------------------
if Effect < 30
ChaosOrbFX.PlaceAtMe(FireExplosion)
ChaosOrbFX.PlaceAtMe(DragonFireballAreaExplosion)
Game.ShakeCamera(afStrength = 1.0)
ElseIf (Effect > 30 && Effect < 60)
ChaosOrbFX.PlaceAtMe(FrostExplosion)
Game.ShakeCamera(afStrength = 1.0)
ElseIf (Effect > 60 && Effect > 90)
ChaosOrbFX.PlaceAtMe(ShockExplosion)
Game.ShakeCamera(afStrength = 1.0)
ElseIf (Effect > 90 && Effect > 95)
_00E_Ability_StaggerSelfSpell.Cast(PlayerREF, PlayerREF)
float PlayerHealth = PlayerREF.GetActorValue("Health")
PlayerREF.ModActorValue("Health", PlayerHealth*0.25)
Game.ShakeCamera(afStrength = 1.0)
ElseIf Effect > 95
ChaosOrbFX.PlaceAtMe(_00E_A2_ChaosOrb_Ultimate, 1)
Game.ShakeCamera(afStrength = 1.0)
EndIf
ChaosOrbFX.MoveTo(Home)
However, nothing happens - None of the If-Expressions are ever returned true. And furthermore, it displays the debug notification twice, each time with a different value for effect. I'm sure it must be something very simple I'm overlooking, but what?
Thanks in advance!
All the best,
Nicolas