chuckmccaw Posted June 4, 2012 Share Posted June 4, 2012 So, scripting is completely new to me, frustrated at it always failing and once i thought i finally got it i got some new errorHeres the script:Scriptname WalkingDeadInfection extends ObjectReference Faction Property FactionAdding Auto Race Property SetRace Auto Spell property reanimateSpell Auto Event OnDeath(Actor akActor) Utility.Wait(5) Actor.SetRace(SetRace) Actor.AddToFaction(FactionAdding)EndEvent The Errors: Starting 1 compile threads for 1 files...Compiling "WalkingDeadInfection"...cannot call the member function SetRace alone or on a type, must call it on a variablecannot call the member function AddToFaction alone or on a type, must call it on a variableNo output generated for WalkingDeadInfection, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on WalkingDeadInfection Link to comment Share on other sites More sharing options...
gasti89 Posted June 4, 2012 Share Posted June 4, 2012 You forgot the Actor property on wich you call the AddToFaction and the SetRace. Also, you may want to call the spell on the actor too? Link to comment Share on other sites More sharing options...
chuckmccaw Posted June 4, 2012 Author Share Posted June 4, 2012 Wait, what are you saying i need to do, the actor is no one specific, and this is a part of a disease magic effect, if you could re-write it i'd be very grateful Link to comment Share on other sites More sharing options...
scrivener07 Posted June 4, 2012 Share Posted June 4, 2012 Scriptname WalkingDeadInfection extends ActiveMagicEffect Faction Property ZombieFaction Auto Race Property ZombieRace Auto Event OnEffectFinish(Actor akTarget, Actor akCaster) If (akTarget.IsDead() == 1) Utility.Wait(5) akTarget.SetRace(ZombieRace) akTarget.AddToFaction(ZombieFaction) Endif EndEvent Link to comment Share on other sites More sharing options...
chuckmccaw Posted June 4, 2012 Author Share Posted June 4, 2012 Thank you kind sir, i will make sure for you to get a special thanks on my mod page Link to comment Share on other sites More sharing options...
scrivener07 Posted June 4, 2012 Share Posted June 4, 2012 Thanks, glad it worked :) Link to comment Share on other sites More sharing options...
steve40 Posted June 4, 2012 Share Posted June 4, 2012 Does changing the race automatically resurrect the NPC, or would you have to call the Resurrect function first??? Link to comment Share on other sites More sharing options...
scrivener07 Posted June 4, 2012 Share Posted June 4, 2012 Good catch Steve Scriptname WalkingDeadInfection extends ActiveMagicEffect Faction Property ZombieFaction Auto Race Property ZombieRace Auto Event OnEffectFinish(Actor akTarget, Actor akCaster) If (akTarget.IsDead() == 1) Utility.Wait(5) akTarget.Resurrect() akTarget.SetRace(ZombieRace) akTarget.AddToFaction(ZombieFaction) Endif EndEvent Link to comment Share on other sites More sharing options...
chuckmccaw Posted June 4, 2012 Author Share Posted June 4, 2012 Well thank you, the both of ye, i was about to bring that up Link to comment Share on other sites More sharing options...
chuckmccaw Posted June 4, 2012 Author Share Posted June 4, 2012 results are sketchy at best, the npc catches the disease and dies, but another time the npc just comes back and only once did it fully worked Link to comment Share on other sites More sharing options...
Recommended Posts