PhilTheGamer1111 Posted April 7, 2018 Share Posted April 7, 2018 (edited) I tried multiple methods to test whether or not the player was in combat, I used the OnEffectStart, OnUpdate, OnObjectEquipped events to try to create the product I wanted, but ultimately it did not work out too well. This is what I have so far: Scriptname BladeScript extends activemagiceffect Weapon Property Blade Auto GlobalVariable Property SummonThing Auto MagicEffect Property Effect Auto <-- From the OnEffectStart trail Event OnObjectEquipped(Form EObject, ObjectReference Reference) float summon = SummonThing.GetValue() While (EObject == Blade) Debug.Notification("In Combat") SummonThing.SetValue(10) If (Game.GetPlayer().GetCombatState() == 0) Debug.Notification("Out of Combat") SummonThing.SetValue(0) endIf endWhile endEvent Edited April 7, 2018 by PhilTheGamer1111 Link to comment Share on other sites More sharing options...
PhilTheGamer1111 Posted April 7, 2018 Author Share Posted April 7, 2018 (edited) This is my further edits, but when testing this, it of course failed. Scriptname BladeScript extends activemagiceffect Weapon Property Blade Auto GlobalVariable Property SummonThing Auto Event OnObjectEquipped(Form BaseObject, ObjectReference Reference) If BaseObject == Blade RegisterForSingleUpdate(1.0) endIf endEvent Event OnUpdate() float summon = SummonThing.GetValue() If (Game.GetPlayer().IsEquipped(Blade)) If (Game.GetPlayer().IsInCombat()) Debug.Notification("In Combat") SummonThing.SetValue(10) else Debug.Notification("Not In Combat") SummonThing.SetValue(0) endIf RegisterForSingleUpdate(1.0) endIf endEvent Edited April 7, 2018 by PhilTheGamer1111 Link to comment Share on other sites More sharing options...
Recommended Posts