I saw this question and was hopeful to find the answer to my question, but no such luck: How do I make someone walk in Skyrim?
I want to, using papyrus ONLY, make Actors that I spawn to travel/patrol to a PatrolIdleMarker, preferably one that I create in the Papyrus script and set the coordinates for.
Example: I want a bandit to appear at a random location but specific distance from the Player. Then I want the bandit to start moving towards the player, attacking the player. The script below works just fine for this:
ScriptName SomeQuestName extends Quest
ActorBase property LvlBanditMelee1H auto
Int BanditStatus Actor Bandits
Event OnInit() Int MaxBandits = 11 Bandits = new Actor BanditStatus = new Int int i=0 while(i
Event OnUpdate() Float SpawnDistance = 15000.0 Float ClearDeadDistance = 10000.0 Float ClearAllDistance = 20000.0 Int SpawnCounter = 0 Int MaxBandits = 10 if (PlayerRef.Z < 20000 && PlayerRef.GetWorldSpace() == Tamriel && (MQ101DragonAttack.IsCompleted() || MQ101DragonAttack.GetStage() > 195)) int i = 0 int j = 0 while(i if(VerboseDebug==1) Debug.Notification("Bandit #" + i + " has wrong BanditStatus.") EndIf Else Distance = PlayerRef.GetDistance(Bandits[i]) if((Bandits[i].IsDead() && Distance > ClearDeadDistance ) || Distance > ClearAllDistance ) If(BanditStatus[i]==2) Bandits[i].Delete() Bandits[i] = None BanditStatus[i]=0 EndIf if(BanditStatus[i]==1) Bandits[i].Disable(true) BanditStatus[i]=2 EndIf EndIf EndIf EndIf i+=1 EndWhile
But lets say I wanted the Bandit to just patrol passed the player, replacing the bandit with say an Imperial guard?
ActorBase property LvlGuardImperial auto
Removing one row to stop spawned actor to start attacking the player from a distance: Bandits[i].StartCombat(PlayerRef)
And instead adding Bandits[i].EnableAI() won't work - the imperial guard will stand in one spot, only moving if combat starts close by or if the player comes into proximity and the guard is hostile to the player. If they are friendly the guard will simply stand/talk but not patrol or walk...
I need the codelines for adding creating a PatrolIdleMarker, LinkedReference or something else that I can set X,Y,Z to related to the Player, so that the spawned Actors will patrol passed the point where the player was when they spawned.
I have even tried to make them patrol to PatrolIdleMarkers already defined in vanilla Skyrim (Stable outside Solitude, Barracks in Falkreath etc), but the Actors will just not start patrolling/walking...
It also seems no forums are active anymore when it comes to Skyrim... I am so glad there will be a new release of Skyrim this fall (Skyrim Remastered) and hopefully some old modders will attend the forums again...