Keysmash2c Posted February 11, 2020 Share Posted February 11, 2020 So I've been making a mod where you can turn any actor of a playable race into a follower, I'm having difficulties with cloning an actor from a leveled list. I find that with the clone they change gender and race (I'm Assuming cycling through the leveled list attributes) other than the one I am trying to copy. I also need the Actor to be unique but I'm having a difficult time making them so. Also I am aware of the possible bugs out of this, I'm still trying to do a rough draft. Scriptname _SEEnthral extends activemagiceffect ReferenceAlias Property EnthrallAlias001 Auto ;Will be a LOT more of these GlobalVariable Property DoOnce Auto ;Variable to determine if multiple weak foes are hit. May just random number gen and choose the lowest numbers in an array? Event OnEffectStart (Actor akTarget, Actor akCaster) ActorBase akreciever = aktarget.GetActorBase() as ActorBase If akTarget != Game.GetPlayer() ;no player victim If DoOnce.getvalue() == 0 ;part of iffy do once idea. DoOnce.Setvalue(1) if akTarget.GetCurrentScene() == None ;makes sure not in scene If akTarget.GetRelationshipRank(Game.GetPlayer()) < 3 && akTarget.GetRelationshipRank(Game.GetPlayer()) >= 0 akTarget.SetRelationshipRank(Game.GetPlayer(), 4) Debug.notification("Stop 4") EndIf ; changes relationship ranking to follower ;set new faction as enthralled, which will also contain package information akTarget.RemoveFromAllFactions() akTarget.ModAv("Morality", 0) akTarget.ModAv("Aggression", 1) aktarget.EnableAI(0) aktarget.stopcombat() Utility.Wait(0.2) EnthrallAlias001.ForceRefIfEmpty(akTarget) ; forces ref into alias than checks to see if it is, template for many more inserts If akTarget ==EnthrallAlias001.GetActorReference() akTarget.SetPlayerTeammate() Debug.Notification("Follow.") Debug.notification("Stop 5") EndIf aktarget.EnableAI(1) ;my weird attempt to consistently force combat end with hostiles, not enough time to play with it more as of writing. if (akreciever.IsUnique() == 0) (akreciever.IsUnique() == 1) aktarget.Disable() aktarget.PlaceActorAtMe(akreciever) Endif EndIf DoOnce.SetValue(0) Else Debug.notification("Stop 2") aktarget.EnableAI(0) ;trying to trigger a stagger if not designated as Thrall target by picker script debug.SendAnimationEvent(akTarget, "StaggerStart") aktarget.EnableAI(1) Endif Else Debug.notification("Stop 1") Endif EndEvent Link to comment Share on other sites More sharing options...
Recommended Posts