The current coding for scriptedpawn while in state wandering doesnt do true random wandering.

It has 30% chance to go in direction X

or it has 30% chance to go in direction Y

or it has 40% chance to go in any direction (which has a 50% change to favor the above diections)

Meaning that the majority of the time it will end up in a cross vector between X and Y

An example of this is if you summon a warlord in spirevillage (near where you first enter the map) and drop a krall on his head. He will kill the krall and go into state wandering as theres no pathnode close by

Eventually he will always end up in the bottom corner of the map and never come out.

To have true wandering the code needs to be changed from

THIS

function PickDestination()
{
local vector pick, pickdir;
local bool success;
local float XY;
//Favor XY alignment
XY = FRand();
if (XY < 0.3)
{
pickdir.X = 1;
pickdir.Y = 0;
}
else if (XY < 0.6)
{
pickdir.X = 0;
pickdir.Y = 1;
}
else
{
pickdir.X = 2 * FRand() - 1;
pickdir.Y = 2 * FRand() - 1;
}
if (Physics != PHYS_Walking)
{
pickdir.Z = 2 * FRand() - 1;
pickdir = Normal(pickdir);
}
else
{
pickdir.Z = 0;
if (XY >= 0.6)
pickdir = Normal(pickdir);
}
success = TestDirection(pickdir, pick);
if (!success)
success = TestDirection(-1 * pickdir, pick);
if (success)
Destination = pick;
else
GotoState('Wandering', 'Turn');
}

To THIS

function PickDestination()
{
local vector pick, pickdir;
local bool success;
local float XY;
pickdir.X = 2 * FRand() - 1;
pickdir.Y = 2 * FRand() - 1;
pickdir.Z = 2 * FRand() - 1;
if (Physics == PHYS_Walking)
pickdir.Z = 0;
pickdir = Normal(pickdir);
success = TestDirection(pickdir, pick);
if (!success)
success = TestDirection(-1 * pickdir, pick);
if (success)
Destination = pick;
else
GotoState('Wandering', 'Turn');
}

Cheers