View Single Post
Old 01-02-2005, 06:29 PM   #2
Well past expiration date
tk102's Avatar
Join Date: Jan 2004
Posts: 5,768
Current Game: FTL
10 year veteran!  Forum Veteran  Helpful!  Notable contributor 
The k_inc_walkways.nss file contains the generic functions used to make people walk the waypoints. The naming of the waypoints is important in order to use these functions:

wp_NPCtag_## where ## is a two digit number starting with 01. The NPCtag portion should match the .utc tag exactly.

(There is a 2nd naming convention that uses wp_xx_## where xx is a two digit number, but this requires extra work with Local Numbers for each creature.)

Now, for generic walkpaths, you only really need one .utw file and then you can use the .git file to spawn it multiple times using different tagnames (using the naming convention described above). Almost every .git file has an example of this in its WaypointList field.

Your .utc's spawn-in script should be modeled after k_def_spawn01.nss inasmuch that you preserve the following lines:
These lines will force your .utc to start walking the waypoints that you've named especially for them.

#glovemaster 19/01/09:
A problem I found was that when you talked to them they stopped walking their waypoints, I had to add the following script to fire onEndDialog to fix it.
#include "k_inc_generic"
#include "k_inc_debug"
#include "k_inc_treas_k2"

void main(){
	// Force them to continue walking waypoints.

Stormtrooper789 says: For random walking you may be able to do without any waypoints. Use the following script:
void main()

Attach this to the .utc OnHeartbeat script event.

Last edited by glovemaster; 01-19-2009 at 12:21 PM.
tk102 is offline   you may: quote & reply,