GetTargetActor

Post » Mon Jun 18, 2012 4:47 pm

I am trying to create a script that will modify the target of a spell. The effect that's target is modified is the reanimateFFaimed0 effect. I have tried everything from Actor target = ReanimateFFaimed0.GetTargetActor() to Actor target = activeReanimateeffect.GetTargetActor(). Every time when I try to compile the script it says "no viable alternative at input '(WhateverITry)'"

What is the problem? What am I supposed to use?
User avatar
naana
 
Posts: 3362
Joined: Fri Dec 08, 2006 2:00 pm

Post » Mon Jun 18, 2012 6:53 pm

Does this describe the problem you're having? http://www.cipscis.com/skyrim/tutorials/editorids.aspx

Cipscis
User avatar
Laurenn Doylee
 
Posts: 3427
Joined: Sun Dec 03, 2006 11:48 am

Post » Mon Jun 18, 2012 4:37 pm

Does this describe the problem you're having?

Cipscis

Eh...not really. After reading some other forum posts, I've decided to temporarily give up on the GetTargetActor() and try this:

Scriptname powerfulundead extends ActiveMagicEffect


Event OnEffectStart(actor akTarget, actor akCaster)
If (akcaster.hasperk(necromancy))
aktarget.modav("health", 500)
aktarget.modav("magicka", 50)
aktarget.modav("stamina", 50)
endIF
endEvent

perk property necromancy auto




This compiled, but seems to not work...any suggestions?
User avatar
James Wilson
 
Posts: 3457
Joined: Mon Nov 12, 2007 12:51 pm

Post » Mon Jun 18, 2012 8:05 pm

The code looks fine to me, is your property set up correctly in the Creation Kit? Try throwing in a couple of debug functions to make sure your code is all running.

Cipscis
User avatar
Dan Scott
 
Posts: 3373
Joined: Sun Nov 11, 2007 3:45 am

Post » Tue Jun 19, 2012 4:43 am

Just tested it out.....It functions, but for some reasons the "modav" functions effected my player, not the target....peculiar... I will try to swap the caster/target actors and see what happens....
User avatar
Gill Mackin
 
Posts: 3384
Joined: Sat Dec 16, 2006 9:58 pm

Post » Mon Jun 18, 2012 11:30 pm

Cannot seem to get the "modav"s to effect the target...very strange...makes no sense....

Also cannot get my 'Debug.trace("Is THIS WORKING?")' to work....
User avatar
suzan
 
Posts: 3329
Joined: Mon Jul 17, 2006 5:32 pm

Post » Mon Jun 18, 2012 7:00 pm

Well, anybody have any suggestions?
User avatar
Gemma Woods Illustration
 
Posts: 3356
Joined: Sun Jun 18, 2006 8:48 pm


Return to V - Skyrim