Can't SetLocation() in a pawn?

Yes more NPC movement stuff.
So I have a pawn that can be ordered to follow you in MP. I want it so that they will teleport to you once you're too far away from them, so they can "follow" you on trains around the city, get past BlockMonsters and so on.
The code seems fine - the debug message shows up when it should be called, but they're just not doing it? This is the relevant code so far...
This code is in the pawn in a Timer(), with DXP being the player. I've tried it with and without "self." before the function. Something to note is that the pawn is in a new following state, but this is global code. Anyone have any idea about this? I wanted to release the mod later today but this is important (and frustrating).

The code seems fine - the debug message shows up when it should be called, but they're just not doing it? This is the relevant code so far...
- Code: Select all
if((DXP != None) && (Enemy == None))
{
if(VSize(Location-DXP.Location) > 1200)
{
self.SetLocation(DXP.Location);
broadcastmessage("debug: tele");
}
else if(VSize(Location-DXP.Location) < 200)
{
gotoState('Standing');
}
else
{
GetMoving();
}
}
This code is in the pawn in a Timer(), with DXP being the player. I've tried it with and without "self." before the function. Something to note is that the pawn is in a new following state, but this is global code. Anyone have any idea about this? I wanted to release the mod later today but this is important (and frustrating).