Aller au contenu

Photo

How do you check to see if an NPC is home?


4 réponses à ce sujet

#1
PavelNovotny

PavelNovotny
  • Members
  • 344 messages
I have an NPC that I want to  run to a waypoint and then fade away.

I used Rubber_SetHome and Rubber_GoHome to send him to the waypoint.

Now what do I do to check and make sure he is there before I make him fade? Also, how do I make him fade?

Thanks!

#2
CID-78

CID-78
  • Members
  • 1 124 messages
put a trigger around the waypoint and let it do the job.

#3
Phaenan

Phaenan
  • Members
  • 315 messages

PavelNovotny wrote...

I have an NPC that I want to  run to a waypoint and then fade away.


Well, if you can't place a trigger and are limited to scripting, you could probably use the COMMAND_COMPLETE creature event to trigger some code after the issued movement command, eventually checking the distance between the current location and the waypoint. (or GetRoamLocation() for the set home location)

#4
Craig Graff

Craig Graff
  • Members
  • 608 messages
GetDistanceBetweenLocations?

#5
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
If the NPC isn't coming back you could use UT_ExitDestroy. It handles the detection for you.