I Need Help Putting A Spell Effect On A Water Type

Post » Sun Nov 18, 2012 11:17 pm

I have been trying to put a spell effect on a water type but it seems to not work. I would really appreciate some help form anyone with experience on this. I wonder if im doing it wrong or if maybe it just does not work. I have exhausted all my ideas and would like some help.

Edit: In case people are reading this and unsure of what im talking about when you go to creating/editing water types under world data on the CK it says "Spell Effect". It leads me to believe that if a spell is set to it and the player walks into the water he will recieve the spell effects. If maybe the reason no one replies is that this is in another topic please let me know.
User avatar
Juan Cerda
 
Posts: 3426
Joined: Thu Jul 12, 2007 8:49 pm

Post » Sun Nov 18, 2012 2:35 pm

bump
User avatar
Tasha Clifford
 
Posts: 3295
Joined: Fri Jul 21, 2006 7:08 am

Post » Sun Nov 18, 2012 5:36 pm

Alright so far no one has replied to my question but im looking at a new way of implementing the results i want from my scripts. The problem now is that the function im am trying to use keeps giving me and error on compile. So, my question is if the way im trying to use this function is not possible or if im missing something.

Scriptname MyScript Extends ActiveMagicEffect

ObjectReference Property FSTWaterSneakRImpact Auto
Potion Property melPotionToGive Auto
KeyWord Property melGivePotion Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
Actor Player = Game.GetPlayer()

If Player.HasEffectKeyWord(melGivePotion) && Player.PlayImpactEffect(FSTWaterSneakRImpact)
Player.AddItem(melPotionToGive)

EndIf

EndEvent
User avatar
Jonathan Windmon
 
Posts: 3410
Joined: Wed Oct 10, 2007 12:23 pm

Post » Sun Nov 18, 2012 5:45 pm

I've never gotten spell effects to work on water properly. I'm not sure activemagiceffect works on activators. What you should have on the activator is an extends objectreference and then an OnTriggerEnter event on a second activator that overlies your water. That event should cast the spell containing the script you have outlined above onto the player.

Three other things:
Always post scripts in script tags, its the one next to the underline box at the utility bar.
If you're getting an error, tell us what the error is or we can be of limited help.
Also, always declare the player as an Actor Property called PlayerREF. This will significantly improve your scripting performance. Game.GetPlayer() is slow.
User avatar
Charlotte X
 
Posts: 3318
Joined: Thu Dec 07, 2006 2:53 am

Post » Sun Nov 18, 2012 7:55 pm

II Ducey Thanks for your help i am new to scripting and new to using forums all together. The PlayerRef. will help alot since all my scripts contain references to the player. I really appreciate the reply, again thank you i will try the OnTrigger event and see if i get it right this time.
User avatar
Lalla Vu
 
Posts: 3411
Joined: Wed Jul 19, 2006 9:40 am


Return to V - Skyrim