I have been trying to make this to work for about 4 hours now, but the wiki nor this forums made it work. So i guess i'm just going to ask it here. I am aware that this might seem simple for some of you, but i have never scripted with papyrus before, so please do understand.
(I'm not Englisch, so i'm sorry for grammer/spelling mistakes
)So my problem is... As soon as i equip something, i want a spell to be cast on the player. I tried using all the functions i'm aware of, but they didn't do the trick(or i used wrong parameters). This is all i have:
Item:
-Script
Scriptname TripAuraScriptBase extends ObjectReference{OnEquip shows message, play sound & shake camera}Sound property AmbRumbleShake autoSpell property TripAuraBasePlayerAbility autoEvent OnEquipped(Actor akActor) if akActor == Game.GetPlayer() Debug.MessageBox("You equipped the Aura. It's effects will help you untill you unequip it.") Game.ShakeCamera() TripAuraBasePlayerAbility.Cast(Self, Game.GetPlayer()) Game.GetPlayer().AddSpell(TripAuraBasePlayerAbility) ;AmbRumbleShake.play(self) endIfEndEventEvent OnUnequipped(Actor akActor) if akActor == Game.GetPlayer() Debug.MessageBox("You unequipped the Aura. It's effects will leave your body.") Game.ShakeCamera() Game.GetPlayer().DispelSpell(TripAuraBasePlayerAbility) ;AmbRumbleShake.play(self) endIfEndEvent-Item:
[img]http://i552.photobucket.com/albums/jj335/fire3lf/Item.jpg[/img]
Magic effect:
Scriptname TripAuraBasePlayerEffectScript extends activemagiceffect{Placed on player};Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) ;Debug.Messagebox("We were hit by " + akAggressor) ;Debug.Trace("We were hit by " + akAggressor);EndEventEvent OnEquipped(Actor akActor) If (akActor == Game.GetPlayer()) Debug.Messagebox("ok") EndIfEndEvent<====== Temp to see if it was working[img]http://i552.photobucket.com/albums/jj335/fire3lf/effect.jpg[/img]
Spell:
[img]http://i552.photobucket.com/albums/jj335/fire3lf/spell.jpg[/img]
I have done lots of different types, but i couldn't make it to work...
If anyone has an idea, please tell me!
Thanks,
Triplus
For those who can make the sound work too, it would be much appreiciated, i don't hear the doun playing (without the ; in the script ofc)



