DAZZLE'S UPGRADE PACK

If you haven't already done so, upgrade your game by downloading Dazzle's all-in-one upgrade pack. It comes with everything you need for today's servers. Does your blue bar freeze when joining servers? Do you lag in games? Do you get an annoying siren in Phobik's Servers? This is what you need. CLICK HERE TO DOWNLOAD.

Teleports

Modding questions, answers, help.....

Moderators: Warfare, Admin, Moderator

Post Reply
Guest

Teleports

Post by Guest »

Im wondering how to make a teleport? How do I turn like a ammo reload gate into a teleport?
User avatar
Speedo
Veteran Light
Veteran Light
Posts: 916
Joined: Sat Jan 20, 2007 11:24 pm
Location: In the pool

Re: Teleports

Post by Speedo »

http://www.freewebs.com/maxworks/

try clicking on the teleport link and downloading the file. havent tried it myself.
Gimmie the scrum!
User avatar
Dazzle
Evil Site Admin
Evil Site Admin
Posts: 1320
Joined: Fri Dec 29, 2006 6:59 am
Location: London, England
Contact:

Re: Teleports

Post by Dazzle »

Code: Select all

// ---- HOW TO SET TELEPORTERS BY DAZZLE ---- \\



// Place the function at the top of the mission file before object write begin \\

// TeleportA is the name of this teleporter, it is the same as the name of the PowerUp (see below) \\
// If you have more than one teleporter use different names for each one like TeleportB etc, remember the powerup name must match the function and datablock names\\

function TeleportA::onenter(%db, %this, %tank)
{
%pos = %tank.getPosition();
%rot = %tank.Rotation;
%newPos = ("SPAWN POSITION" @ "GATE POSITION" @ %rot); // The spawn position is where you want the tank to appear after it has teleported and the gate position is the position of the actual teleporter gate taken from the power up for example: %newPos = ("282.447 -75.1106 234.087" @ "14.1092 33.282 190.195" @ %rot);  \\
%tank.setTransform(%newPos);
}
datablock powerupdata(TeleportA)
{
aipickup = 0;
emitterduration = 0;
maxoff = 100;
minoff = 50;
shadow = 1;
shadowanimation = 1;
shape = "~/data/shapes/Common/scrumgoal.dts";   // Path to teleport gate \\
starton = 0;
staticshadow = 0;
};

// ======================================================================================================== \\

// This goes in the mission file with other objects, I usually put this at the very end of the mission file after the objects, arrows, power ups etc - \\
// Place static teleporter object in TGE and use the static object information to create the power up data, remember to delete the static object from the mission file \\

      new TSStatic() {
         position = "14.1092 33.282 190.195";
         rotation = "1 0 0 0";
         scale = "1 1 1";
         shapeName = "~/data/shapes/Common/scrumgoal.dts";
      };

// So the above becomes the below \\

   new PowerUp() {
      dataBlock = "TeleportA";
      position = "14.1092 33.282 190.195";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      lightBoost = "0";
   };
_Anonymous_
New Brainjar
New Brainjar
Posts: 23
Joined: Fri Apr 24, 2009 8:46 pm

Re: Teleports

Post by _Anonymous_ »

what does "the gate position is the position of the actual teleporter gate taken from the power up for example" mean?
If at first you don't succeed, failure may be your style.
- Quentin Crisp
User avatar
Metal
Need Major Repair
Need Major Repair
Posts: 1278
Joined: Fri Dec 26, 2008 5:48 pm

Re: Teleports

Post by Metal »

You set a power up where you want it to be a teleporter....

Find your power up in .mis...

Edit datablock to teleportergate...

That's where your teleporter want to be set and where to get you...I mean where to teleport you...

AND WATCH THE DATE OF POST!
Post Reply