WorldBuilding/MissionEditor/PhysicalZone
From TDN
|
[edit]
Introduction
Physical Zones (p-zones) are areas that modify the player's gravity and/or velocity and/or applied force.
[edit]
Setup
A Physical Zone is simply created in the MissionEditor, but then applied through the combine use of some scripting and triggers.
Please read the Trigger section to also understand this area of Torque.
Typical zone:
new PhysicalZone(Booster) {
position = "-158.282 968.511 195.767";
rotation = "1 0 0 0";
scale = "1 1 1";
velocityMod = "10";
gravityMod = "1";
appliedForce = "0 4000 0";
polyhedron = "0.0000000 0.0000000 0.0000000 1.0000000
0.0000000 0.0000000 0.0000000 -1.0000000
0.0000000 0.0000000 0.0000000 1.0000000";
};
[edit]
Types
[edit]
VelocityMod
[edit]
GravityMod
[edit]
AppliedForce
[edit]
Game Usage
[edit]
Boosters
[edit]
Teleporters
To be detailed at a later stage.
[edit]
Killzones
datablock TriggerData(KillZoneTrigger)
{
tickPeriodMS = 100;
};
function KillZoneTrigger::onEnterTrigger(%this,%trigger,%obj)
{
commandToServer('suicide');
}
// .. i'm not sure what the intention behind the above code snippet is, but it seems flawed to me.
// onEnterTrigger() is a server-side call, not client side, so commandToServer() is not appropriate.
// as well, having the client be authoritative for killing itself is just bad design and subject to exploit.



