Jump to content

Need Help - testing Morph spells


MaskedpENGUiN

Recommended Posts

I need some help with script, I am developing my mod for Skyrim, (which is already up), but I want to be able to add a Morph Race Spell (or a few) to it. So far my script works to change into the race, and I have a working function to force them to equip a specific spell in one hand. Here are my issues:

 

- Only one hand works (left hand) right hand can't do anything, not cast spells or do unarmed attacks even if i force them to equip a spell in it

- The character isn't changing back to their original race when the spell duration expires.

 

Also keep in mind I am a terrible programmer, I don't do it much and I am VERY new to it so pls explain any answers in clear English, thank you :)

 

Here is my code (it resides within the Magic Effect script field)

--------------------------------------------------------------------------------------------

 

Scriptname TestPolymorphEffectScript extends ActiveMagicEffect
Race Property PolymorphRace auto
Spell Property akSpell auto
Int Property aiSource auto
Race Property PlayerRace auto
Function equipSpell(Spell akSpell, int aiSource) native
Event OnEffectStart(Actor Target, Actor Caster)
if (Target.GetActorBase().GetRace() != PolymorphRace)
Target.SetRace(PolymorphRace)
endif
Target.equipSpell(akspell, aiSource)
EndEvent
Event OnEffectFinish(Actor Target, Actor Caster)
Target.SetRace(PlayerRace)
endEvent
--------------------------------------------------------
NOTE: I am trying to make it detect what the original player was so that other people can use it, apparently if you set it to NONE it will work but it doesn't, I have even tried having this as the OnEffectFinish event:
-----------------------
Event OnEffectFinish(Actor Target, Actor Caster)
Target.SetRace(None)
endEvent
----------------------------
Help is appreciated, thank you.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...