Ok I just tested it and it worked for me.
Here is how my test went.
1 - I created a new trigger and placed the script in the OnEnter Event.
2 - I painted three of the triggers down.
3 - I created three generic waypoints and gave them the tags:
WT_TOWN01
WT_TOWN02
WT_TOWN03
4 I created a Flag Placeable with the ResRef : townflag // I forgot to make it nonstatic and useable.
5 I fixed my error in the include file. The one posted earlier, and saved the include. // changes to Include files
have to be saved before the files that use them are recompiled.
6 I recompiled the script.
7 I tested the module and everything worked fine. Except I could not read the flags because they where static.
8 I looked a how big if a pain it would be to use a different tag, and modified the script to use a constent that can be changed at the top. Instead of having to change every where the tag Prefix was used in the script.
#include "_randomtags"
#include "X0_I0_TRANSPORT"
const string RND_WAYPOINT = "WT_TOWN0";
void main()
{
// since it is a trigger you might as well make them step in it.
object oTravler=GetEnteringObject();
object oFlag;
string sName;
if (!GetIsPC(oTravler)) return;
object oDest=GetLocalObject(OBJECT_SELF, "TRANS_TARGET");
//Check to see if we still need to set up a destnation for this trigger.
if (oDest == OBJECT_INVALID)
{
//Check to see if the random tag has been initilized. If the number of tags
// available is 0 it has not been.
if (GetNumOfAvailableTags(RND_WAYPOINT)== 0) InitRandomTag(RND_WAYPOINT);
SendMessageToPC(oTravler,"There are "+IntToString(GetNumOfAvailableTags("WT_TOWN0"))+" Destnations Left" );
// set oDest to one of the waypoints and store it on this trigger.
oDest = GetWaypointByTag(GetRandomTagOnceOnly(RND_WAYPOINT));
SetLocalObject(OBJECT_SELF, "TRANS_TARGET", oDest);
// Drop a flag for the town I am going to.
oFlag = CreateObject(OBJECT_TYPE_PLACEABLE, "townflag", GetLocation(oTravler));
// Set the Name of the tag to the area it is going to.
sName = GetName(GetArea(oDest));
SetName(oFlag,sName);
// Set the description for the flag.
SetDescription(oFlag,"This passage goes to "+sName);
}
// Since oDest is a way point, the extra code for the doors in the other
// script is not needed.
TransportToWaypoint(oTravler,oDest);
}
Give it another try and if you still can not get it to work, Mail if to me so i can see what is going on. Just make sure you let me know you mailed it. **I only check my mail box when i know something is comming.