I'm spawning creatures in an area at waypoints. MOB_1 - MOB_10. I would like to reuse this script for multiple areas with the same waypoint names in each area. I'm afraid that it may randomly pick an area with the waypoint name however. Is there a way to only use the waypoints in the area the script was triggered? Below is a snippet of my code.
object oTarget;
object oSpawn;
location lTarget;
int i = 1;
while( i < 11){
SendMessageToPC(oPC, "Testing the value of i: " + IntToString(i));
oTarget = GetWaypointByTag("MOB_"+ IntToString(i));
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, mob, lTarget);
i++;
}





Retour en haut







