Patrol Shifts

Post » Wed Oct 23, 2013 4:03 am

I have three npcs who I want to take turns at doing a Patrol Package which only uses two xmarkers. The problem is that the npcs just go to Xmarker01 and stands still without continuing to Xmarker02. I have navmeshed the whole area.

Maybe I've done it wrong from the beginning but here's what I have at the moment:

A quest with three PatrolGuy aliases and with this script attached to it:

Scriptname MyQuestScript Extends Quest Hiddenint property WhoToPatrol auto conditional

Then I have three patrol packages (one for each alias) pointing to Xmarker01. The Xmarker01 has Xmarker02 as a linked ref. Xmarker02 has Xmarker01 as a linked ref.

The conditions of the packages are as follows:

Subject GetVMQuestVariable MyQuest WhoToPatrol == 0 ; the first packageSubject GetVMQuestVariable MyQuest WhoToPatrol == 1 ; the second packageSubject GetVMQuestVariable MyQuest WhoToPatrol == 2 ; the third package

And most important of all each package has a script in their "On End" script fragment (When their package ends they should return to their normal sandbox package):

; the first packageMyQuestScript myScript = GetOwningQuest() as MyQuestScriptif myScript != None ; sanity check	myScript.WhoToPatrol = 1                myScript.Alias_PatrolGuy01.GetActorRef().EvaluatePackage()                myScript.Alias_PatrolGuy02.GetActorRef().EvaluatePackage()endif; the second packageMyQuestScript myScript = GetOwningQuest() as MyQuestScriptif myScript != None ; sanity check	myScript.WhoToPatrol = 2                myScript.Alias_PatrolGuy02.GetActorRef().EvaluatePackage()                myScript.Alias_PatrolGuy03.GetActorRef().EvaluatePackage()endif; the third packageMyQuestScript myScript = GetOwningQuest() as MyQuestScriptif myScript != None ; sanity check	myScript.WhoToPatrol = 0                myScript.Alias_PatrolGuy03.GetActorRef().EvaluatePackage()                myScript.Alias_PatrolGuy01.GetActorRef().EvaluatePackage()endif
User avatar
Wane Peters
 
Posts: 3359
Joined: Tue Jul 31, 2007 9:34 pm

Return to V - Skyrim