antstubell Posted August 26, 2021 Share Posted August 26, 2021 So have this script on a xmarker activator and it casts in this case a sparks spell. ObjectReference Property Ssource AutoObjectReference Property Starget01 AutoSpell Property mySpell AutoEvent OnActivate(ObjectReference triggerRef)mySpell.cast(Ssource, Starget01)Utility.Wait(5)EndEvent I want to stop the cast when player enters a triggerbox, so I put this script on a triggerbox. Actor Property PlayerRef AutoObjectReference Property SpellACT AutoEvent OnTriggerEnter(ObjectReference akActionRef)if akActionRef == PlayerRefSpellACT.InterruptCast()EndIfEndEvent Spell still casts. What am I missing here or doing wrong?Thanks. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted August 26, 2021 Share Posted August 26, 2021 Make sure the object assigned to the SpellACT and Ssource properties is the same object. And if they are, make sure that whatever triggers the activation of the xmarker script is not still activating it. Link to comment Share on other sites More sharing options...
antstubell Posted August 27, 2021 Author Share Posted August 27, 2021 Are you saying that the xmarker activator on which the script is running should also be the Ssource? Meaning I should change the line in the first script to - mySpell.cast(Self, Starget01) Link to comment Share on other sites More sharing options...
IsharaMeradin Posted August 27, 2021 Share Posted August 27, 2021 No, I am saying that whatever object you assign to the SpellACT property on the second script should also be the same object assigned to the Ssource property on the first script. You make sure those two properties have the same assigned object. If after that the casting still does not stop, you need to ensure that whatever is triggering the OnActivate event on the xmarker is not re-triggering the event. This is because there are no conditions and it might be possible that it is being re-triggered and giving the illusion of not being stopped. Link to comment Share on other sites More sharing options...
antstubell Posted August 27, 2021 Author Share Posted August 27, 2021 But I can't select the XmarkerActivator that the script is running on as a property because it is running the script.That was my original answer above which is true but as I said in my previous post changing the line does fix it. Thanks for your time.mySpell.cast(Self, Starget01) Link to comment Share on other sites More sharing options...
IsharaMeradin Posted August 27, 2021 Share Posted August 27, 2021 That makes sense now. The way the script was written it was assumed that the xmarker was merely a controller for a separate object assigned to the Ssource property. If you are casting from the xmarker, then using Self, as you have figured out, is the way to go. Link to comment Share on other sites More sharing options...
Recommended Posts