Aller au contenu

Photo

Making NPCs wait before walking their waypoints. (RESOLVED)


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I want an NPC to stand still until I want them to start walking their waypoints.  Initially I tried stopping their HB script until an integer is set, but on spawn, they still go to a waypoint even though their HB script wasn't turned on yet.  Next I tried changing their tag, then changing it to the appropriate tag for the waypoints, but when I changed their tag, they just stood there.  Any suggestions would be helpful.

Modifié par M. Rieder, 27 novembre 2011 - 03:10 .


#2
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
The waypoints are looked up and stored at spawn, so switching tags or deleting waypoints won't help you. Additionally, I think different scripts, besides the heartbeat, call the WalkWaypoints function. I ended up creating a custom version of the core walkwaypoints script, with a conditional that checks a integer set on the NPC.

The custom walkwaypoints system, though, developed by OEI for the townwalkers in the OC, has a delay function.

#3
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Got it. I had to use the following code to shut off the walkwaypoints system.

AssignCommand(oTarget,ClearAllActions(TRUE));
AssignCommand(oTarget,SetWalkCondition(NW_WALK_FLAG_PAUSED, TRUE));

Clear all actions is just to make sure the NPC stops.