so for instance i add this script to the magic Effect
Scriptname TestMagicCombo extends ActiveMagicEffectimport inputimport Utilityint iHotKey = 257bool bFlameOn = Falsebool bFlamebolt = FalseFloat fPlayerHealthspell Property Togflames Autospell Property ConFire AutoObjectReference Property PlayerTarget AutoEvent OnInit()Debug.Notification("spell initialised")PlayerTarget = Game.GetPlayer()RegisterForSingleUpdate(0.01)EndEventEvent OnUpdate()fPlayerHealth = PlayerTarget.GetActorValuePercentage("Health")bob()RegisterForSingleUpdate(0.01)EndEventFunction bob()While(IsKeyPressed(iHotKey)) if(fPlayerHealth>25) Togflames.Cast(PlayerTarget) Else ConFire.Cast(PlayerTarget) EndIf EndWhileendFunction
two problems:
1) the onInit() is never called for the ActiveMagicEffect so you cant use that to set up the script to to work for RegisterForSingleUpdate(), so i need another event to have the script check the players health to the effect that is being cast
2) im not sure if the spell.cast method will act as I want it to, say if I have the two spells be versions of flames (but the ConFire one is more powerful) will it cast the flames the same as if i was using vanilla flames and holding down M1 of M2.
any help on this would be awesome im really interested in trying to create spells that have dynamic effects.