Game Development Community

Current Player Location in Script ?

by Sikosis · in Torque Game Engine · 12/18/2004 (2:31 pm) · 3 replies

How do I find out the current player location using TorqueScript ?

#1
12/18/2004 (2:36 pm)
%player.getPosition().

(sorry, had wrong command).
#2
12/18/2004 (2:47 pm)
Hehehe, you threw me off the first time ;) No probs.

Now, how about getting the MissionArea.

I notice in C++ code it's done like this:-

Point3F pos;
MissionArea * obj = dynamic_cast(Sim::findObject("MissionArea"));
const RectI &area = obj->getArea();
getTransform().getColumn(3, &pos);

Is there a getMissionRegion or something ... perhaps the better question, is there is a complete torquescript command reference somewhere ?
#3
12/18/2004 (3:09 pm)
There isn't a command to get the mission area. The mission area is called "MissionArea" in all maps, by default. So "MissionArea" in script is the mission area.

You would use it something like this:
MissionArea.flightCeiling = 1000;