Spell not working

Post » Mon Nov 19, 2012 6:04 pm

Hey, I'm working on a spell that's meant to spawn a summon portal that shoots fireballs at the player, but when I cast it ingame the spell doesn't do anything. I'm a noob at scripting and I don't know what's causing this problem or what can I do to solve it. Can you guys help me?


Scriptname RCInmovilization extends activemagiceffect  Activator Property SpellActivator  Auto  SPELL Property Fireball  Auto  STATIC Property XMarkerHeading  Auto  ObjectReference Property PlayerREF autoEvent onEffectStart(Actor akTarget, Actor akCaster)ObjectReference newMarker = akCaster.PlaceAtMe(XMarkerHeading) ;Placing the markernewMarker.moveto(akCaster, 0.0, 0.0, akCaster.GetHeight() + 10, true) ;Moving the invisible marker to caster locationObjectReference newActivator = newMarker.PlaceAtMe(SpellActivator) ;Spawning the activator to marker's positionFireball.Cast(akSource = newActivator, akTarget = PlayerREF)endEventEvent onEffectFinish(Actor akTarget, Actor akCaster)  Debug.Trace("Magic effect fades from " + akTarget)EndEvent
User avatar
Adrian Powers
 
Posts: 3368
Joined: Fri Oct 26, 2007 4:44 pm

Post » Mon Nov 19, 2012 6:58 am

Try:
Spoiler
ScriptName RCInmovilization Extends ActiveMagicEffect  Activator Property SpellActivator AutoActor Property PlayerREF AutoSpell Property Fireball AutoEvent OnEffectStart(Actor akTarget, Actor akCaster)	ObjectReference kPlacedActivator = akCaster.PlaceAtMe(SpellActivator, 1, False, True) ; Placing one initially disabled, non-peristent activator	kPlacedActivator.MoveTo(akCaster, 0.0, 0.0, akCaster.GetHeight() + 10, True) ; Moving the invisible marker to caster location	kPlacedActivator.Enable()	Fireball.Cast(kPlacedActivator, PlayerREF)EndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster)	Debug.Trace("Magic effect fades from " + akTarget)	kPlacedActivator.Disable()	kPlacedActivator.Delete()EndEvent
?
User avatar
Haley Merkley
 
Posts: 3356
Joined: Sat Jan 13, 2007 12:53 pm

Post » Mon Nov 19, 2012 2:06 am

It doesn't work :( Maybe it's something with the magic effect properties. I have made sure that it has a projectile, magnitude, duration, and all that stuff but it's still doing nothing when I cast it ingame.

Edit: Casting the actual player spell does nothing, but attaching the function cast() on Hit on an actor works flawlessly. Any ideas of why is this happening?
User avatar
C.L.U.T.C.H
 
Posts: 3385
Joined: Tue Aug 14, 2007 6:23 pm


Return to V - Skyrim

cron