Jump to content

Reanimation on Swords


okokokok

Recommended Posts

So i came up with this brilliant idea of cutting someone down. and cutting them to life again.

 

First try was to enchant a sword with reanimation. which failed. only works when reanimation is on staffs.

So i than tried to make a work around it, adding a spell OnEquip, witch worked great but using a spell manually after cutting someone down wasn't really the same as cutting them back too life.

So i discarded that idea.

 

So now I'm try to script it, to making it work like i originally Intended.

But I'm not so well versed in the art of scripting you see. and my script is quite flawed.

 

Anyway this is what i have so far

 

;The name of the Script.
scn UndyingFuryEnch

;I'm a little unsure what this actually does but it seems nessessary that its there.
Ref TargetRef

;Is this the correct way to begin the script?
begin ScriptEffectStart

;this is the solution i came up with to check whether the object under the crosshair is dead or alive.
Set TargetRef to GetCrosshairRef

if (TargetRef.GetDead == 1)
;not sure if addspell will actually send the spell at the target or if it just adds it to my spellbook. :/
         addspell aaaUndyingfury
;The rest is self-explanatory. although if you see something wrong correct me please
         PlayMagicShaderVisuals effectreanimate
         playsound "SPLConjurationHit"

endif

end

         begin ScriptEffectFinish
         StopMagicShaderVisuals effectreanimate
         removespell aaaUndyingfury
end

 

 

As you can see I'm Questioning a lot of the things I've done. So, -- looking at this, could we get some brain-storming or something going here so we could complete this script?

 

Any thoughts or ideas are greatly appreciated.

Link to comment
Share on other sites

Could you skip around the reanimate part entirely and add a resurrect effect and some shaders to the target instead?

 

Add a script to the sword with Begin OnHit instead of ScriptEffectStart. I'm not sure about how to set who the target is, though.

Link to comment
Share on other sites

i believe to set the target you use the line

 

set Target to GetTargetRef

 

At least I think it is. Not too sure

 

edit

Actually its this:

 

scn NAMENAMENAME

 

short Target

Ref TargetRef

 

Begin ScriptEffectStart

 

set target to TargetRef

Cast SPELLSPELLSPELL targetref

 

end

 

At least thats how you do it. I don't know if it works on striking the dead. You coulld also change the scripteffectstart to onhit if its a weapon script. The one above is for enchantments.

Link to comment
Share on other sites

Ok so i tryed totally reworking the script. But to no avail, i had hoped to make it work like Nicoroshi

did for his mod Nicos Gift( dont worry he posted the mod as a modders resource so i didnt really steal anything), but to no avail.

 

scn UndyingFuryEnchScript

Ref TargetRef
Ref MyRef
Ref BoneRef

begin ScriptEffectStart

Set TargetRef to GetSelf

if (TargetRef.GetDead == 1)
         Set BoneRef to PlaceAtMe SkelBoneThin01        
       Set MyRef to GetSelf
         BoneRef.Cast aaaUndyingfury MyRef
       BoneRef.Disable    

endif

end

         begin ScriptEffectFinish
end

 

It made the spell go off alright but this script only works for simpler spells ( like fire, frost and shock spells, or disintegrate armor/weapons)

but Reanimate seems to need the player to cast the spell for it to work at all.

 

Also:

i believe to set the target you use the line

 

set Target to GetTargetRef

 

At least I think it is. Not too sure

 

edit

Actually its this:

 

scn NAMENAMENAME

 

short Target

Ref TargetRef

 

Begin ScriptEffectStart

 

set target to TargetRef

Cast SPELLSPELLSPELL targetref

 

end

 

At least thats how you do it. I don't know if it works on striking the dead. You coulld also change the scripteffectstart to onhit if its a weapon script. The one above is for enchantments.

 

Thanks i'll try it but, begin ScriptEffectStart works great if the scipt is put on as enchantment effect and the enchantment is put on a weapon.

 

but ofc if OnHit works better I'll try that.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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