<p style="text-align:left;margin-left:0;margin-right:auto;"></p>
+<p style="text-align:left;margin-left:0;margin-right:auto;"><strong>bd.
+Teleport</strong> - warps the user to the specified location. This command is
+normally used after a building has loaded.<br>
+Syntax: <font face="Courier New, Courier, mono" size="2">Teleport
+<em>X, Y, Z</em></font><br>
+Example: <font face="Courier New, Courier, mono" size="2">Teleport 3, 5, 10</font></p>
+
+<p style="text-align:left;margin-left:0;margin-right:auto;"></p>
+
<p></p>
<p align="left"> </p>
return sNextLine;
}
+ //Teleport command
+ if (linecheck.substr(0, 8) == "teleport")
+ {
+ //get data
+ int params = SplitData(LineData, 9);
+
+ if (params != 3)
+ return ScriptError("Incorrect number of parameters");
+
+ //check numeric values
+ for (int i = 0; i <= 2; i++)
+ {
+ if (!IsNumeric(tempdata[i]))
+ return ScriptError("Invalid value: " + tempdata[i]);
+ }
+
+ Ogre::Vector3 destination;
+ destination.x = ToFloat(tempdata[0]);
+ destination.y = ToFloat(tempdata[1]);
+ destination.z = ToFloat(tempdata[2]);
+
+ Simcore->camera->GotoFloor(Simcore->GetFloorNumber(destination.y));
+ Simcore->camera->SetPosition(destination);
+
+ return sNextLine;
+ }
+
//GotoFloor command
if (linecheck.substr(0, 9) == "gotofloor")
{