im trying to make a script that will automaticly use the "Blood of the North" lesser power when my hitpoints drops below 20%. i dont want it to be a power i can activate on demand, only when my hps drops,
You could have a quest running constantly that checks the Player's health, and then activates Blood of the North if needed. The quest script could be ....
ScriptName MyBloodOfTheNorthQuestScriptFloat fQuestDelayTimeFloat PlayerBaseHealthFloat PlayerCurrentHealthBegin GameMode Set fQuestDelayTime to 2 ;This will make it run every two seconds Set PlayerBaseHealth to Player.GetBaseActorValue Health Set PlayerCurrentHealth to Player.GetActorValue Health If ( PlayerCurrentHealth / PlayerBaseHealth ) < 0.2 If ( Player.IsSpellTarget BloodOfTheNorth == 0 ) Player.Cast BloodOfTheNorth Endif EndifEnd
Although, I've never forced the Player to cast anything and I don't know if it would work if the Player is currently playing another animation, like swinging a weapon, or for that matter is knocked down on the ground.
An alternative would be to have an activator cast Blood of the North on the Player instead of the Player being script-forced to do it themselves, and then also deducting 50 magicka from the Player so they still have to pay the magicka cost.
And if you want to get fancy and don't want a quest script running all the time when unnecessary, then you could break out some OBSE power and use the User-Defined Function OnHealthDamage that could run a script only when the Player takes damage.