Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Waypoints

Page: 1 of 1
 TimBob12
02-09-2011, 11:50 AM
#1
Hello there,

Ive been using some waypoints and everything has gone well so far. I have on question though. Is there a way to make an NPC pause at a waypoint before continuing to the next waypoint? Also if I pause one will I then have to pause them all?

Thanks

TB12
 newbiemodder
02-09-2011, 12:00 PM
#2
I think the pause as well as other waypoint features are controlled in the generic spawn script itself that you find on the .utc templates...not sure though...
 Fastmaniac
02-09-2011, 12:19 PM
#3
Hello back there,

There are some possibilities depending on what you want... Do you want the NPC to move if a certain condition succeeds or do you just want him to wait a few seconds?

First Case: You have to do some seperate scripts. When condition is true the npc walks to the next waypoint. And so on.

Second Case: Then it's just a simple Delaycommand or ActionWait in the script.

Fastmaniac
 TimBob12
02-09-2011, 12:35 PM
#4
which script would i add it to as i am using original game scripts after following the tutorial.
 Fastmaniac
02-09-2011, 12:50 PM
#5
so you're using waypoints from the game?

That's good and it would be something like


void main(){
ActionWait(2.0);
AssignCommand(GetObjectByTag("TAG_OF_NPC", 0), ActionMoveToObject(GetObjectByTag("WAYPOINT_1", 0), 1, 0.0));
ActionWait(20.0);
AssignCommand(GetObjectByTag("TAG_OF_NPC", 0), ActionMoveToObject(GetObjectByTag("WAYPOINT_2", 0), 1, 0.0)));
}


This script is telling the NPC to move to WAYPOINT_1 and assumes he has reached the Waypoint in less than 20 Seconds. Then the NPC is told to move to Waypoint_2. If it takes the NPC longer to reach the Waypoint increase the number of Seconds in the second ActionWait.

Hope that helps...

Fastmaniac
Page: 1 of 1