Mareca Posted March 22, 2012 Share Posted March 22, 2012 (edited) Hi guys.I need a script that when you are at low health,healing spell activates (some healing idk to heal good amount and costs little),and i need again script that activates fireball again on low health.Can someone do it? PS:I know this isn't a request for some mod but i didn't know where to put it,so can someone do it? Edited March 22, 2012 by Mareca Link to comment Share on other sites More sharing options...
WarRatsG Posted March 22, 2012 Share Posted March 22, 2012 The script would depend on where it is attached. But from what you are saying I think that you mean the player will automatically cast these spells. The script would have to be attached to a quest or object to work. Scn AutoHealSCRIPT Float fQuestDelayTime Short LowHP Begin GameMode Set fQuestDelayTime to 1 ;The script will check every second to see if you need healing. Set LowHP to ( ( Player.GetBaseAv Health ) * 0.2 ) ;You will be healed at 20% health or lower. If Player.GetAv Health > LowHP Return Else Player.Cast <EditorID of healing spell goes here> ;Forces the player to cast spell endif End This is the basic idea for the healing effect. The fireball effect is a little bit more difficult, because the command "Cast" does not allow the player to cast ranged or touch spells. My workaround would be to make an activator that shoots the fireball. The only problem with that is the targeting. You have given very little information as to how this spell will be used, so its difficult to make a script for it. One possibility is to simply make the fireball have an area of effect, but this would hurt the player as well. I could probably make a workaround for you, but I would need more information about where, when, how and why the spell is cast. Either way, I hope that the script I have given you helps out. :) Link to comment Share on other sites More sharing options...
Mareca Posted March 23, 2012 Author Share Posted March 23, 2012 thank you i like it!I will now add it to the CS!And one thing.You can set that i can dodge fireballs like you sad.And thanks again! :biggrin: I will give you kudos! Link to comment Share on other sites More sharing options...
Recommended Posts