Jump to content

Help with a Shout/Power that turns an NPC into a dragon?


Ashlander80

Recommended Posts

As part of the story in a mod me and some other guys are putting together (we consider it more of an unofficial expansion), we're going to need our follower to be able to turn into a dragon. We're going through great lengths to make sure we implement our story into the existing lore seamlessly, just wanted to point out that the dragon shapeshifting is lore friendly, no just random dragon madness for the sake of it.

 

However, this is far beyond what any of us are capable of doing. It may not even be possible with the CK for all we know. We're learning a lot of what we need to do as we go. I figured it would have to be some sort of power or shout, but i dont know we would go about actually making it happen, nor what we would do for the animation of him shifting. We havent even attempted to do this yet as we no idea what would be the best way to do it. Any ideas, or help, or if you can just flatout do it for us, would be greatly appreciated. Anyone that contributes will be given due credit when its released.

Link to comment
Share on other sites

Got the human -> dragon transformation to work using this script:

 

 

Scriptname apHumanAllyScript extends Actor  

Actor Property apDragonForm  Auto  
bool property apCanTransform Auto

event oninit()
       apCanTransform = true
endevent

event ondeath(actor apKiller)
       apCanTransform = false
endevent

; Testing block - uncomment if you don't feel like starting combat every time

;event onactivate(objectreference apRef)
;       ;turn into a dragon
;       apDragonForm.moveto(self)
;       apDragonForm.enable()
;       disable()
;endevent

event oncombatstatechanged(actor apTarget, int apState)
       if apState == 1
               registerforsingleupdate(0.5)
       endif
endevent

event onupdate()
       if getcombatstate() == 1
               if getavpercentage("health") <= 0.50 && apCanTransform == true
                       ;turn into a dragon
                       apDragonForm.moveto(self)
                       apDragonForm.enable()
                       disable()
               endif
               registerforsingleupdate(0.5)
       else
               unregisterforupdate()
       endif
endevent

Courtesy of Average Porcupine on bethsoft forums.

 

No luck getting him to change back though. Ideally he should should change back when combat is over, but i can only get the change-back to work when the player 'activates' him.

 

Change-back code from the same guy as above.

 

Scriptname apDragonAllyScript extends Actor  

Actor Property apHumanForm  Auto  
bool property apIsDead Auto

event oninit()
       apIsDead = false
endevent

event ondeath(actor apKiller)
       apIsDead = true
endevent

event oncombatstatechanged(actor apTarget, int apState)
       if apState == 0 && apIsDead == false
               ; combat has ended, return to human form
               ;apHumanForm.moveto(self)
               apHumanForm.enable()
               disable()
       endif
endevent

 

 

Also tried modifying the initial change-into code (that works) to work to do the opposite, no luck with this either.

 

Scriptname apDragonAllyBackScript extends Actor  

Actor Property apHumanForm  Auto  
bool property apCanTransform Auto

event oninit()
       apCanTransform = true
endevent

event ondeath(actor apKiller)
       apCanTransform = false
endevent

; Testing block - uncomment if you don't feel like starting combat every time

event onactivate(objectreference apRef)
;       ;turn into a dragon
      apHumanForm.moveto(self)
      apHumanForm.enable()
      disable()
endevent

event oncombatstatechanged(actor apTarget, int apState)
       if apState == 0
               registerforsingleupdate(0.5)
       endif
endevent

event onupdate()
       if getcombatstate() == 1
               if getavpercentage("health") <= .50 && apCanTransform == true
                       ;turn into a human
                       apHumanForm.moveto(self)
                       apHumanForm.enable()
                       disable()
               endif
               registerforsingleupdate(0.5)
       else
               unregisterforupdate()
       endif
endevent

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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