//Script Name: i3s_walkaway
//
//What is Does: Place it on the last node of a conversation and make your NPC(s) walk away to a set waypoint.
//
//Notes: This is an extremly simple script, but it might of use to somebody. The situation I have it in; the Module starts with a group of NPC's //surrounding //the PC. At the end of the conversation, the 3 distinct groupsd of NPC's walk to the three waypoints and destroy themselves. The //interesting part of the //loop which allows you to create NPC's with similar tags but a different number at the end of the tag. Using this you can execute //the script on as many or //as few NPC's that you want.
//
//I hope this is helpful to somebody.
//::///////////////////////////////////////////////
//:: FileName gs_walkaway
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Androclese
//:: Created On: 7/17/2002 4:40:42 PM
//:://////////////////////////////////////////////
void main()
{
object oSoldierWayPoint1 = GetObjectByTag("GSoldierWP");
object oSoldierWayPoint2 = GetObjectByTag("OGSoldierWP");
object oSoldierWayPoint3 = GetObjectByTag("GSCommanderWP");
object oOldGrizzledSoldier = GetObjectByTag("OldGrizzledSoldier");
object oGrizzledSoldierCommander = GetObjectByTag("GrizzledSoldierCommander");
object oGrizzledSoldierx;
int i;
for (i=1;i<9;i++) {
oGrizzledSoldierx = GetObjectByTag("GrizzledSoldier0" + IntToString(i));
AssignCommand(oGrizzledSoldierx, ActionMoveToObject(oSoldierWayPoint1, TRUE, 1.0));
AssignCommand(oGrizzledSoldierx, ActionDoCommand (DestroyObject (OBJECT_SELF, 0.0)));
}
AssignCommand(oOldGrizzledSoldier, ActionMoveToObject(oSoldierWayPoint2, TRUE, 1.0));
AssignCommand(oOldGrizzledSoldier, ActionDoCommand (DestroyObject (OBJECT_SELF, 0.0)));
AssignCommand(oGrizzledSoldierCommander, ActionMoveToObject(oSoldierWayPoint3, TRUE, 3.0));
AssignCommand(oGrizzledSoldierCommander, ActionDoCommand (DestroyObject (OBJECT_SELF, 0.0)));
}