Warp Script

Author Topic: Warp Script  (Read 3723 times)

When re-learning Torque to help me scripts better i made a simple warp script!


Code: [Select]
$meta = 50;
function serverCmdWarpPlayer(%client)
{
%client.player.setCloaked(1);
%avatar = %client.player;
%eyeVector = %avatar.getEyeVector();
%warpVector = vectorScale(%eyeVector,$meta);
%currentPos = %avatar.getPosition();
%newpos = vectorAdd(%currentPos,%warpVector);
%currentTrans = %avatar.getTransform();
%orientation = getWords(%currentTrans, 3);
%newtransform = %newpos SPC %orientation;
%avatar.setTransform(%newTransform);
%client.player.setCloaked(0);
}

Aim up to warp up
Aim down to warp down
Aim left to warp left
Aim right to warp right.

Where ever you AIM is where you will warp.

use commandtoserver('warpplayer');

set $meta = 50;  to the meters you want

This is for retail right?

Haha! Funny.
« Last Edit: June 01, 2007, 03:48:34 PM by MrPickel »



*cough*...there already is a warp function in BLR that works just like this. :D

*cough*...there already is a warp function in BLR that works just like this. :D

what is it?


It works? If so, could I use the code to get where to make my stationary bots look when I go back to playing and scripting? I stopped playing and scripting because I want to play Maplestory because it's completely different from Blockland...

It works? If so, could I use the code to get where to make my stationary bots look when I go back to playing and scripting? I stopped playing and scripting because I want to play Maplestory because it's completely different from Blockland...

Sure, just add me in credit somewhere if you release it.

Dark i just thought i'd tell you, you can also type /warpplayer.

Doesn't /warp do the same thing, except allow you to go as far as you want?

Doesn't /warp do the same thing, except allow you to go as far as you want?

idk?


Haha. You jacked that script straight out of a Torque Book. That's really low.

Release your teleporters with Badspots suggestion of onRemove it saves the teleporter end to a file :D