adding a perk to an actor through a magic effect script?

Post » Thu Sep 04, 2014 9:14 am

just to test this, i setup a script on the fire damage effect attached to the fireball spell.

Scriptname addperkonmagiceffect extends activemagiceffect

perk property myperk auto

event oneffectstart(actor target, actor caster)

target.addperk(myperk)

endevent

the script compiled, and i manually added the perk property to it

the created myperk is mainly blank, with no target conditions (since it has no other way of being applied)

with one entry point for mod incoming spell magnitude - set value = http://forums.bethsoft.com/topic/1506911-adding-a-perk-to-an-actor-through-a-magic-effect-script/0.00

set to getisid "fireball" on the spell tab

this should add the perk to my target after it gets hit by the first fireball, and then make them take 0 damage from any additional fireballs

however, it doesn't work.

is it possible to add perks to targets through this method? if so, any idea what i may have done wrong?

User avatar
Steeeph
 
Posts: 3443
Joined: Wed Apr 04, 2007 8:28 am

Post » Thu Sep 04, 2014 3:16 pm

http://www.gamesas.com/topic/1477291-add-a-perk-to-all-actors-in-the-game/

User avatar
Jani Eayon
 
Posts: 3435
Joined: Sun Mar 25, 2007 12:19 pm

Post » Thu Sep 04, 2014 7:40 am

A work-around for your situation might be to have the spell's script add an ability to the target (and optionally, to remove the ability after a set time/the actor's death if you don't want it to be permanent), and then on the fireball magic effect/spell conditions tab set it to apply the effect/spell only if the target does not have that ability.

User avatar
Charlie Ramsden
 
Posts: 3434
Joined: Fri Jun 15, 2007 7:53 pm


Return to V - Skyrim

cron