idenfuse22 Posted May 3, 2010 Share Posted May 3, 2010 Hello everyone,I am in need of a script that will equip a piece of armor and casts a spell when your health gets below 30-20%(or below 20-50 health) at the same time. either one is fine.I am needing this for a mod I am making,I Suck at scripting and i fail everytime,If u can make the script,and then just in () tell me where i put the armor code/spell at. Credit will be gave to the scripter that does it! :wub: Link to comment Share on other sites More sharing options...
nosisab Posted May 3, 2010 Share Posted May 3, 2010 Hello everyone,I am in need of a script that will equip a piece of armor and casts a spell when your health gets below 30-20%(or below 20-50 health) at the same time. either one is fine.I am needing this for a mod I am making,I Suck at scripting and i fail everytime,If u can make the script,and then just in () tell me where i put the armor code/spell at. Credit will be gave to the scripter that does it! :wub:I'm not sure if understand what you really want. If is just an item that does the trick you could use something like short TriggerHealth Begin GameMode Set TriggerHealth to (Player.GetBaseActorValue Health) * 0.3 If ((Player.GetActorValue Health) <= TriggerHealth) Player.ResetHealth Endif End That is not the most efficient script since it run at each frame but does the trick. You may be interested in looking at:http://cs.elderscrolls.com/constwiki/index.php/Main_Page Good luck. PS: you can use the same piece and change the Player.ResetHealth for the Player.EquipItem xyz, assuming you make sure the player has the item, the same for the spell, find the function in the link above :thumbsup: PS: there is some tricky issues one should be aware on EquipItem function, seehttp://cs.elderscrolls.com/constwiki/index.php/EquipItem Link to comment Share on other sites More sharing options...
idenfuse22 Posted May 3, 2010 Author Share Posted May 3, 2010 Hello everyone,I am in need of a script that will equip a piece of armor and casts a spell when your health gets below 30-20%(or below 20-50 health) at the same time. either one is fine.I am needing this for a mod I am making,I Suck at scripting and i fail everytime,If u can make the script,and then just in () tell me where i put the armor code/spell at. Credit will be gave to the scripter that does it! :wub:I'm not sure if understand what you really want. If is just an item that does the trick you could use something like short TriggerHealth Begin GameMode Set TriggerHealth to (Player.GetBaseActorValue Health) * 0.3 If ((Player.GetActorValue Health) <= TriggerHealth) Player.ResetHealth Endif End That is not the most efficient script since it run at each frame but does the trick. You may be interested in looking at:http://cs.elderscrolls.com/constwiki/index.php/Main_Page Good luck. PS: you can use the same piece and change the Player.ResetHealth for the Player.EquipItem xyz, assuming you make sure the player has the item, the same for the spell, find the function in the link above :thumbsup: PS: there is some tricky issues one should be aware on EquipItem function, seehttp://cs.elderscrolls.com/constwiki/index.php/EquipItem Thanku very much it Helped me greatly!:) Link to comment Share on other sites More sharing options...
Recommended Posts