Jump to content

Set new script stage when NPC gets close to player


daisy8

Recommended Posts

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 ?

 

Cheers

Daisy

Link to comment
Share on other sites

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...