okokokok Posted October 10, 2010 Share Posted October 10, 2010 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 More sharing options...
ub3rman123 Posted October 10, 2010 Share Posted October 10, 2010 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 More sharing options...
okokokok Posted October 10, 2010 Author Share Posted October 10, 2010 If im not misstaken resurrect wouldn't give you power over it.It wont make it follow you and fight for you.and thats kinda the point. I'll change it to OnHit though thanks :) Link to comment Share on other sites More sharing options...
ub3rman123 Posted October 10, 2010 Share Posted October 10, 2010 Oh yeah, you're right about that. Does the spell Reanimate have special scripting on it or is it hard coded? Link to comment Share on other sites More sharing options...
okokokok Posted October 10, 2010 Author Share Posted October 10, 2010 Oh yeah, you're right about that. Does the spell Reanimate have special scripting on it or is it hard coded?pretty sure its hard coded Link to comment Share on other sites More sharing options...
McMuffin Posted October 11, 2010 Share Posted October 11, 2010 The wiki page on Resurrect has a good example script which you might adapt for this. Then you could probably use AddScriptPackage to make them follow and fight. Link to comment Share on other sites More sharing options...
Deleted1848331User Posted October 12, 2010 Share Posted October 12, 2010 i believe to set the target you use the line set Target to GetTargetRef At least I think it is. Not too sure editActually its this: scn NAMENAMENAME short TargetRef TargetRef Begin ScriptEffectStart set target to TargetRefCast 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 More sharing options...
okokokok Posted October 12, 2010 Author Share Posted October 12, 2010 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 editActually its this: scn NAMENAMENAME short TargetRef TargetRef Begin ScriptEffectStart set target to TargetRefCast 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 More sharing options...
Recommended Posts