Hello community.
I am working on a mod that one small aspect will have a quest update when the player casts a specific spell at a specific npc.
I considered using the OnSpellCast, but do not know if it is when the target casts it or the player. I assume the script would need to be attached to the target and that it would be some manner of "activemagiceffect" type script. My Scripting knowledge is very basic but I would assume it would be something like this.
ScriptName ExampleQuestTrigger Extends ObjectReference
Actor Property Creature Auto
Quest Property QuestName01 Auto
MagicEffect Property ModdedSpell Auto
If PlayerRef Casts ModdedSpell at me
QuestName01.SetStage(100)
EndIf
Sorry for the sadness that is my scripting ability but help with this would really speed things along for me.
I intend to enable the creature when the quest starts to avoid quest breaking and OnDeath for player failure.
Thank you