Script issue with requireing a npc to be a follower

Post » Mon Nov 26, 2012 11:10 pm

So I am working with my evolving follower script and attempting to improve it.

So far the transformation between races happens for the Follower. I am trying to add a requirement that the NPC has to be a certain rank in the CurrentFollowerFaction for the race changes to take place.

The problem is the follower is changing race even though they have not achieved the proper rank in the Currentfollowerfaction yet.

The script is intended to do the follower

Check npcs current race, check the npcs rank in the Currentfollowerfaction and check the npcs level.

Based on that information the npcs race is changed to the appropriate race.

So far the race changes work but the npc is still being changed even though they are not 0 or higher rank with the CurrentFollowerFaction.

I will be honest. I pretty much have no idea what I am doing and the script so far is just a hodge podge of other scripts I have pieced together.

Thank you for any help you may be able to provide :)

[Code] Scriptname Npc_evolutionscript_notext extends ActiveMagicEffect
{NPC evolving through polymorph effect}

Spell Property PolymorphSpell auto
FormList Property WerewolfDispelList auto
Race Property PolymorphRace1 auto
Race Property PolymorphRace2 auto
Race Property PolymorphRace3 auto
Faction Property CurrentFollowerFaction auto
Weapon Property MonsterWeapon auto
Explosion Property EndExplosion auto
ImageSpaceModifier Property ChangeFX auto
Idle Property IdleWerewolfTransformation auto

; EVENTS

Event OnEffectStart(Actor Target, Actor Caster)
GetTargetActor().PlayIdle(IdleWerewolfTransformation)
PrepShift()
Utility.Wait(1.5)
GetTargetActor().placeAtMe(EndExplosion)

IF (Target.GetActorBase().GetRace() != PolymorphRace1) || (Target.GetActorBase().GetRace() != PolymorphRace2) || (Target.GetActorBase().GetRace() != PolymorphRace3) && (Target.GetFactionRank(CurrentFollowerFaction) >= 1)

IF(Target.Getlevel()
User avatar
gemma
 
Posts: 3441
Joined: Tue Jul 25, 2006 7:10 am

Return to V - Skyrim