StealthDick Posted August 22, 2018 Share Posted August 22, 2018 if (aaaElDoradoQuest.bHectorState == 1) olHectorREF.moveto OlHectorAWMarker olHectorREF.enable set aaaElDoradoQuest.bHectorState to 2 elseif (aaaElDoradoQuest.bHectorState == 2) olHectorREF.addscriptpackage aaaHectorAWStool showmessage PreorderMessageSuite endif endif end My NPC becomes disabled at a certain part of my quest. In this script the NPC is supposed to teleport to the Atomic Wrangler, become enabled, and sit at a stool. However, he's just been teleporting there and walking back to the cell where his daily tasks take place. After much tweaking I've been able to get him to stay in the atomic wrangler with the script above, however he keeps trying to leave but his script keeps giving him the stool sit package. IDK what to do, if my post doesnt make sense I'll repost it. Link to comment Share on other sites More sharing options...
dubiousintent Posted August 22, 2018 Share Posted August 22, 2018 You need to give him an "idle" package to run while at the Atomic Wrangler and then do an EvaluatePackage (.EVP) function on the NPC to get them to switch the active package. Otherwise he continues with the first package in his list that evaluates to "true" every time the game re-evaluates AI packages. Put a conditional on the package that's the equivalent of "while in the AW" so it only runs when there. Please see 'TIP: Using AI Packages', 'TIP: Making NPCs move (aka "AI Packages")', and 'TIP: AI Packages and Distance' in the "Custom NPCs" section of the wiki "Getting started creating mods using GECK" article. Depending upon what you use to signal he is in the AW, you want to avoid re-initializing that code every time he is in the AW. So you need an "Else" condition for after the first time it is run if he is still in "aaaElDoradoQuest.bHectorState == 1" the next time the package is evaluated. -Dubious- Link to comment Share on other sites More sharing options...
StealthDick Posted August 22, 2018 Author Share Posted August 22, 2018 thanks dubious Link to comment Share on other sites More sharing options...
munnibhai Posted August 26, 2018 Share Posted August 26, 2018 Thanks. This also gave me great info of why it happened to me too. :) Link to comment Share on other sites More sharing options...
Recommended Posts