case 4: // Moving WEST
167 {
168 --nCurAreaX;
169 sDestAreaX = GetNumberPadding(nCurAreaX) + IntToString(abs(nCurAreaX));
170 oArea = GetObjectByTag(sDestAreaX + sCurAreaY + sCurAreaZ);
171 lLoc = Location(oArea,Vector(fMaxAreaDim- fLandingOffset,vPCVector.y),fPCFacing);
172 if (nDEBUG) if (GetIsPC(oPC)) SendMessageToPC(oPC,"Moving West:" + "\\nDestination Area X TAG is " + sDestAreaX + "." + "\\nDestination Area Y TAG is " + sCurAreaY + ".");
173 if ((oArea != OBJECT_INVALID) && (GetAreaFromLocation(lLoc) == oArea))
174 {
175 SetLocalInt(oPC,"m_nZoning",TRUE);
176 TransportEffect(oPC,fTransitionDelay);
177 if (GetIsPC(oPC)) FloatingTextStringOnCreature("Moving West...",oPC);
178 DelayCommand(fTransitionDelay,AssignCommand(oPC,JumpToLocation(lLoc)));
179 DelayCommand(fTransitionDelay,SetLocalInt(oPC,"m_nZoning",FALSE));
180 DelayCommand(fTransitionDelay,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eZoneEffect3,lLoc));
181 }
182 break;
183 }
Line 170 - why are you getting the area by tag -
Does this functionality not run within an area, and merely jump the player back and forth from one end of the map to simulate him traversing similar terrain for long periods of time?
Could GetArea(oPC) not be used instead?
Perhaps I miss the purpose of the function - in which case - ignore.
I have seen issues where if you have 2 areas (or more), with the same named tag, then try to port to a location generated with the wrong area- it can jump you to the wrong x,y,z coords (ive ended upinside walls)
If you could modify the script, to pump out debug information about the vector calculations, you could track and see where the problems arise.
my hunch is it might be around this part
169 sDestAreaX = GetNumberPadding(nCurAreaX) + IntToString(abs(nCurAreaX));
170 oArea = GetObjectByTag(sDestAreaX + sCurAreaY + sCurAreaZ);
171 lLoc = Location(oArea,Vector(fMaxAreaDim- fLandingOffset,vPCVector.y),fPCFacing);
But I have no concrete evidence that leads me to that idea - just a hunch.