View Single Post
Old 01-02-2005, 06:29 PM   #2
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Dragon Age: Origins
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:
Code:
GN_SetDayNightPresence( AMBIENT_PRESENCE_ALWAYS_PRESENT);
GN_SetListeningPatterns();  
GN_WalkWayPoints();
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.
Code:
#include "k_inc_generic"
#include "k_inc_debug"
#include "k_inc_treas_k2"

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


Stormtrooper789 says: For random walking you may be able to do without any waypoints. Use the following script:
Code:
void main()
{
	AssignCommand(OBJECT_SELF,ActionRandomWalk())
}

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,