Well...we'd need a bit more specifics on things like if this is going to be used in more than one area, if you are going to be using different npcs/creatures, will the creatures spawn at different locations, should this only happen once, etc... But for what you have asked you could do something like this:
-first put down a waypoint where you want the creatures to spawn.
-then put a script in the area's OnEnter event like so:
void main()
{
object oWaypoint = GetWaypointByTag("Tag of waypoint here");
location lSpawn = GetLocation(oWaypoint);
string sResRef = "res ref of creature to spawn here";
int iRandom = Random(3)+1;//change the 3 to how many spawns you want
while (iRandom > 0)
{
object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, sResRef, lSpawn);
AssignCommand(oSpawn, ActionRandomWalk());
iRandom--;
}
}
Hope this gets the ball rolling.
Modifié par GhostOfGod, 16 mars 2011 - 05:42 .