WildWitch Posted November 28, 2014 Posted November 28, 2014 Hiya Im writing a script that applies a blessing to a player when they release a soul from a soulgem via a spell. I want to make it so that greater, common, lesser, petty soulgems cause the player to recieve a blessing. Heres what I have so far Scriptname zzz_ReleaseWhiteSoulScript extends activemagiceffect SoulGem Property SoulGemGrand AutoSoulGem Property SoulGemGreater AutoSoulGem Property SoulGemCommon AutoSoulGem Property SoulGemLesser AutoSoulGem Property SoulGemPetty AutoMiscObject Property SoulGemShards AutoSound Property FailureSFX Automessage property failureMSG automessage property SuccedGrandMSG automessage property SuccedGreaterMSG automessage property SuccedCommonMSG automessage property SuccedLesserMSG automessage property SuccedPettyMSG autoSpell property BlessingGreater autoSpell property BlessingCommon autoSpell property BlessingLesser autoSpell property BlessingPetty autoEVENT OnEffectStart(Actor akTarget, Actor akCaster) objectReference caster = akCaster if caster.getItemCount(SoulGemGrand) >= 1 caster.removeItem(SoulGemGrand, 1, TRUE) Game.GetPlayer().ModActorValue("magicka", 2) caster.addItem(SoulGemShards, 2, FALSE) SuccedGrandMSG.show() elseif caster.getItemCount(SoulGemGreter) >= 1 caster.removeItem(SoulGemGreater, 1, TRUE)--> caster.addItem(SoulGemShards, 2, FALSE) SuccedGreaterMSG.show() elseif caster.getItemCount(SoulGemCommon) >= 1 caster.removeItem(SoulGemCommon, 1, TRUE)---> caster.addItem(SoulGemShards, 2, FALSE) SuccedCommonMSG.show() elseif caster.getItemCount(SoulGemLesser) >= 1 caster.removeItem(SoulGemLesser, 1, TRUE)---> caster.addItem(SoulGemShards, 2, FALSE) SuccedLesserMSG.show() elseif caster.getItemCount(SoulGemPetty) >= 1 caster.removeItem(SoulGemPetty, 1, TRUE)---> caster.addItem(SoulGemShards, 2, FALSE) SuccedPettyMSG.show() else FailureSFX.play(caster) failureMSG.show() endifendEVENT As you can see there are gaps where the spell cast function should be as I have no idea how to do it.
lofgren Posted November 28, 2014 Posted November 28, 2014 Make the spells cast on self and have the player cast them. That is the way that shrines do it.
WildWitch Posted November 28, 2014 Author Posted November 28, 2014 On 11/28/2014 at 4:19 AM, lofgren said: Make the spells cast on self and have the player cast them. That is the way that shrines do it.So I just need to put in (blessing Name).cast(playerRef, playerRef) ?
lofgren Posted November 28, 2014 Posted November 28, 2014 Based on the script you have here, it could be (Blessing Name).Cast(akCaster)
Recommended Posts