talore008 Posted December 5, 2009 Share Posted December 5, 2009 hi im wanting to alter a spell script so i can make it to where you can toggle it on and off like the hunter sight mod. Link to comment Share on other sites More sharing options...
talore008 Posted December 6, 2009 Author Share Posted December 6, 2009 ok here is the script its for a a flying spell that i dled it works pretty good but kinda bleh with out the ability to turn it on or off hehe. scn WaldelfLevi01EffectScript float angleZ float Xfloat Yfloat Zfloat DXfloat DYfloat DZfloat oldXfloat oldYfloat oldZfloat oldDXfloat oldDYfloat oldDZfloat maxDXYfloat t1float t2float t5float t6float sinafloat turbo begin ScriptEffectStart if GetInWorldSpace Tamriel == 0 messageBox "Levitation needs wild spaces and nature's forces" dispel WaldelfLevi01 endif enableFastTravel 0 set oldX to getPos x set oldY to getPos y set oldZ to getPos zend begin ScriptEffectFinish enableFastTravel 1end begin ScriptEffectUpdate if isInInterior dispel WaldelfLevi01 endif set X to getPos x set Y to getPos y set Z to getPos z set DZ to Z - oldZ ; Levitation set DX to x - oldX set DY to y - oldY if (DX*DX)>(DY*DY) set maxDXY to DX else set maxDXY to DY endif if maxDXY < 0 set maxDXY to -maxDXY endif set Z to oldZ if isSneaking==0 set turbo to 64 else set turbo to 4 endif if (DX*DX+DY*DY>8) set X to oldX + turbo*DX/maxDXY set Y to oldY + turbo*DY/maxDXY; endif setPos x , X setPos y , Y set angleZ to GetAngle x ;Message angleZ+1 ;set Z to Z - (angleZ/180) if angleZ < -180 set angleZ to angleZ + 360 elseif angleZ > 180 set angleZ to angleZ - 360 endif set t1 to angleZ / 57.29577951 ; precalculate powers of "angle" set t2 to t1*t1 set t5 to t2*t2*t1 set t6 to t5*t1 set sina to t1 - t1*t2/6 + t5/120 - t5*t2/5040 + t6*t2*t1/362880 set Z to Z - turbo*(sina) endif setPos z , Z set oldX to X set oldY to Y set oldZ to Z set oldDZ to DZ resetFallDamageTimerend Link to comment Share on other sites More sharing options...
talore008 Posted December 8, 2009 Author Share Posted December 8, 2009 anyone? Link to comment Share on other sites More sharing options...
Deleted81892User Posted December 8, 2009 Share Posted December 8, 2009 you need to change your flying spell into an ability, then create a new spell with this as a script effect: ScriptName flyingspellScript Begin ScriptEffectStart If ( Player.IsSpellTarget flyingability == 0 ) Player.AddSpell flyingability ElseIf ( Player.IsSpellTarget flyingability == 1 ) Player.RemoveSpell flyingability EndIfEnd hope this helps. Link to comment Share on other sites More sharing options...
talore008 Posted December 10, 2009 Author Share Posted December 10, 2009 Thanks!! :) Link to comment Share on other sites More sharing options...
talore008 Posted December 10, 2009 Author Share Posted December 10, 2009 hrm i tried it out and it doesnt activate it it just sorta deletes it from my spell list hehe Link to comment Share on other sites More sharing options...
XJDHDR Posted December 10, 2009 Share Posted December 10, 2009 I'm usually quite good at giving this sort of advice but the script you posted above is a bit too complicated for me to work out how it works. Maybe if you give me a link to the mod in question, I can download it and take a look at how it works and maybe give appropriate advice. Link to comment Share on other sites More sharing options...
talore008 Posted December 10, 2009 Author Share Posted December 10, 2009 heres the link thanks :) http://www.tesnexus.com/downloads/file.php?id=4094 Link to comment Share on other sites More sharing options...
XJDHDR Posted December 13, 2009 Share Posted December 13, 2009 I've finally finished making levitation togglable. Please find the new ESP attached to this post. I haven't tested it but it should work as expected. If not, please tell me. I would probably suggest you save your game before trying any of the new spells, which you can buy from Volanaro or Edgar. Link to comment Share on other sites More sharing options...
talore008 Posted December 13, 2009 Author Share Posted December 13, 2009 ah thanks a ton :) Link to comment Share on other sites More sharing options...
Recommended Posts