Auto cast powers.

Post » Mon Nov 19, 2012 8:44 am

How do I create powers that cast automatically?

For example: When my health is below 20% a power sets off?
User avatar
Scotties Hottie
 
Posts: 3406
Joined: Thu Jun 08, 2006 1:40 am

Post » Mon Nov 19, 2012 12:17 pm

You could add a condition to the ability which checks when the players health is below 20%. Apply this condition to the spell rather than the magic effect.
For checking health below 20%, you would add the condition


GetActorValuePercent - Health < 20
Run On Player

By adding this condition to the ability(spell) this is checked every second, whereas if you added it to the magic effect it would only be checked once.

The ability would then activate only when the players health was below 20%. In this example it would cast every time the player went below 20%. It would deactivate once the player was equal to or above 20%. This is pertinent if you wanted to apply a duration spell, at 20% the duration spell would cease.
User avatar
Project
 
Posts: 3490
Joined: Fri May 04, 2007 7:58 am

Post » Mon Nov 19, 2012 3:57 pm

I did it almost exactly like you said, but I thought it was too easy. Btw, when you mean Run On Player, you mean set the player as the reference right?
User avatar
Laura Ellaby
 
Posts: 3355
Joined: Sun Jul 02, 2006 9:59 am

Post » Mon Nov 19, 2012 2:07 pm

I did it almost exactly like you said, but I thought it was too easy. Btw, when you mean Run On Player, you mean set the player as the reference right?

When you create a new condition on a spell, you should see a drop down box with "Run On" to the left.
Basically this determines where your condition should be checked. Since you want it on the player, you could set the Run On option to either Subject or Player.

The difference between using subject and player is if you use PLAYER, the condition will always be run on the player.
If you use SUBJECT, the condition will run on the actor that has the magic/spell effect.

Since your spell is on the player, both subject and player options will work.
User avatar
Auguste Bartholdi
 
Posts: 3521
Joined: Tue Jun 13, 2006 11:20 am

Post » Mon Nov 19, 2012 1:06 pm

Thanks for your help.
User avatar
Margarita Diaz
 
Posts: 3511
Joined: Sun Aug 12, 2007 2:01 pm


Return to V - Skyrim