Jump to content

Cast spell on death


Fienyx

Recommended Posts

I'm trying to get a spell to cast on my death, but nothing happens. My spell is a targeted fire damage spell immune to silence and I have the reload timer set to a very high number. I'm no good with scripting.  What I have in my script

 

begin ondeath

 

            cast myspell player

 

            player.resurrectactor

 

            cast (some healing spell I can't remember the ID) player

 

end

 

 

Link to comment

Ok, found shambles have basically what I want, but it doesn't seem to work for the PC. This is the new script. 

 

scn pheonixdeathscript
 
Ref MyRef
Ref BoneRef
 
Begin ScriptEffectFinish
 
           If GetDead == 1
               Set BoneRef to PlaceAtMe SkelBoneThin01
               Set MyRef to GetSelf
               BoneRef.Cast SOPdeathNova MyRef
               BoneRef.disable
               player.resurrect 1
          EndIf
End
 
 
Edit: After some playing around, I realized it's not giving the ability on start like I selected, and if the reload time is set real high, and you open the console and type player.resurrect 1, you're stuck on the ground and have lost active effects, but can cast magic. No moving around or anything though. This is beyond me if it's at all possible.... What I was going for was to have a powerful area fire spell blast away the enemies, then I rise from the ashes. 
 
 
 
 
Link to comment

did more research and am a complete loss. It doesn't add the spells it's supposed to. Here's the esp if anyone wants to play around with it. 

 

 

 

Edit: Made some changes and tried setting pc essential. Still no luck. The above is the modifies esp.

Link to comment

Saw that, had set essential done properly. Even had camera commands CameraReset to hopefully take care of the camera issue. I wish having MS didn't cause the reading issues I now have, otherwise I could study and put out some awesome mods. This one has caused me several migraines and a few seizures. It doesn't even add the spells. I'm hoping someone could look at what I have and maybe get it to work. There's 3 scripts, one to add the spells, one for a magic effect, and one to upgrade spells based on destruction level. The fourth is jut the hp regen script from wphealthregen. If no one feels up to perusing  this, then it's a dead mod. 

Link to comment
  • 3 weeks later...

So psyced, got everything working almost flawlessly. The only issue now is the spell that causes damage on death does not stay. The 3 other spells stay, and I even have the script set to check if the spell is there, and if not, to re-add it.

 

scn pheonixdeathscript
 
Short Flagdead
Ref MyRef
Ref BoneRef
float timer
 
Begin ScriptEffectFinish
If (player.GetDead)
set Flagdead to 1
Set BoneRef to PlaceAtMe SkelBoneThin01
Set MyRef to GetSelf
BoneRef.Cast SOPdeathNova MyRef
BoneRef.disable
player.ResurrectActor 1
set Timer to 0
player.ToggleSpecialAnim SOPrise 1
player.Update3D
CameraReset
 
ElseIf (Flagdead)
if(Timer < 3)
set Timer to Timer + GetSecondsPassed
else
        set FlagDead to 0
player.HasSpell SOPdeath
If (player.HasSpell SOPdeath == 0)
player.addspellns SOPdeath
endif
endif
endif
End
 
 
Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use