daisy8 Posted October 30, 2013 Share Posted October 30, 2013 Hey again I have a NPC moving to the player using an alias package. When they get close to the player I want the quest to advance to a new stage and then the NPC can run a second package on the new stage. I have tried a script on the NPC with quest stage and distance to player if statements but this isn't working. I don't think I am using the getdistance right. I really just need a simple script to set a new stage. Any hints ? CheersDaisy Link to comment Share on other sites More sharing options...
Pevey Posted October 30, 2013 Share Posted October 30, 2013 You could try setting up the first package as a moveto package to get the NPC to near the player. Open that package in the CK, and you should see a tab to add a small script at the beginning or end of the package. Use the Ending option to set the stage of your quest once the package has ended, ie, when the NPC has reached the player. Link to comment Share on other sites More sharing options...
daisy8 Posted October 30, 2013 Author Share Posted October 30, 2013 Hi, thanks. Forgot about that. One problem though. GetOwningQuest().SetStage(60) in that box does not advance the quest ?? The NPC stops trying to follow the player everywhere but the stage is not set to 60 ?? Link to comment Share on other sites More sharing options...
Pevey Posted October 30, 2013 Share Posted October 30, 2013 A couple of things to check: make sure 60 is a valid stage. Setstage will silently fail if it is not a stage or if it is a previous stage and you have not specifically checked the checkbox on the Quest Data tab to allow stages to be repeated. If this doesn't apply, add a debug.notification("hello world") to your little script to make sure it is being called. Link to comment Share on other sites More sharing options...
daisy8 Posted October 30, 2013 Author Share Posted October 30, 2013 Hi again All good ! Just had to tell the package what quest to set ! Done Thanks ! Link to comment Share on other sites More sharing options...
Recommended Posts