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.

How to set a teleportgate in the mission?

Modding questions, answers, help.....

Moderators: Warfare, Admin, Moderator

Post Reply
User avatar
TYF
New Brainjar
New Brainjar
Posts: 90
Joined: Wed Aug 13, 2008 7:23 am
Location: Shanghai

How to set a teleportgate in the mission?

Post by TYF »

I need your help!
ImageImage
User avatar
TYF
New Brainjar
New Brainjar
Posts: 90
Joined: Wed Aug 13, 2008 7:23 am
Location: Shanghai

Re: How to set a teleportgate in the mission?

Post by TYF »

no page found...
ImageImage
User avatar
Dazzle
Evil Site Admin
Evil Site Admin
Posts: 1320
Joined: Fri Dec 29, 2006 6:59 am
Location: London, England
Contact:

Re: How to set a teleportgate in the mission?

Post by Dazzle »

Its a download dude. Jeez do we have to do everything for you guys, perhaps a little reading in the modding resource thread might just answer you questions instead of just posting question after question, how do you think any of us learnt do do these things in the first place, yes you guessed right we read the infomation that is in these and the old PTT forums!!!

Look at the Maxworks site it has LOADS of infomation:
www.freewebs.com/maxworks
Also
http://supra.planetthinktanks2.com/arch ... icated.asp
http://supra.planetthinktanks2.com/arch ... s-info.asp


But her you go, this is the teleport download

Teleporter Directions;

__________________________________________________________________

Step 1. The first thing you need to do is place gates reload gates using ModWiz

1a. Launch ThinkTanks and go into the map you want.

1b. Put down 2 reload gates using modwizard. 1 for where you want to enter, and one for where you want to go or any other combination you want.

1c. Save the modwiz file and exit TT. Find the mw#_#.mis file and rename as you would do normally.

1d. Open the mission file or .mis in a basic text editor of your choice.
__________________________________________________________________

Step 2. The text below is called the "function text". It can be used in pairs or apart of a sequence.

Code: Select all

//This is the 'function text"//

function 1st variable::onenter(%db, %this, %tank)
{
%pos = %tank.getPosition();
%rot = %tank.Rotation;
%newPos = ("0.000 0.000 0.000" @ " " @ %rot);
%tank.setTransform(%newPos);
}
datablock powerupdata(1st variable)
{
aipickup = 0; 
emitterduration = 0;
maxoff = 100; 
minoff = 50; 
shadow = 1; 
shadowanimation = 1;
shape = "game/data/shapes/common/recharge.dts";
starton = 0; 
staticshadow = 0; 
}; 

__________________________________________________________________

Below, is an example of a pair "function text", that can be copied and pasted to the top of the .mis file. This text should go before (or above) //--- OBJECT WRITE BEGIN ---
__________________________________________________________________

Code: Select all

//Beginning of the first pair of 'function text"//

function teleportgate1a::onenter(%db, %this, %tank)
{
%pos = %tank.getPosition();
%rot = %tank.Rotation;
%newPos = ("0.000 0.000 0.000" @ " " @ %rot);
%tank.setTransform(%newPos);
}
datablock powerupdata(teleportgate1a)
{
aipickup = 0; 
emitterduration = 0;
maxoff = 100; 
minoff = 50; 
shadow = 1; 
shadowanimation = 1;
shape = "game/data/shapes/common/recharge.dts";
starton = 0; 
staticshadow = 0; 
}; 

function teleportgate2a::onenter(%db, %this, %tank)
{
%pos = %tank.getPosition();
%rot = %tank.Rotation;
%newPos = ("0.000 0.000 0.000" @ " " @ %rot);
%tank.setTransform(%newPos);
}
datablock powerupdata(teleportgate2a)
{
aipickup = 0; 
emitterduration = 0;
maxoff = 100; 
minoff = 50; 
shadow = 1; 
shadowanimation = 1;
shape = "game/data/shapes/common/recharge.dts";
starton = 0; 
staticshadow = 0; 
}; 
//End of the first pair of 'function text"//

 //--- OBJECT WRITE BEGIN ---        <------------------------This should be below the "function text"

__________________________________________________________________

Step 3. Understand what you just did.

Notice that you just added 2 sets of the "function text" which are the same except for lines 1 and 8. (in bold)
The first copy has "Teleportgate1a" and and the second copy has "Teleportgate2a".
You can name them whatever you want as long as you can tell which ones are which. Especially if you are pairing them together. (see bottom of page)
__________________________________________________________________

Step 4. Find the reload stations you just put in.

Scroll down the mission file to where your reload gates are. They should be at the bot-tom if they were the last thing added. Prepare to edit them.
__________________________________________________________________

Step 5. Turn the the reload gates into a teleport gate.

In this step you are going to change the datablock of the reload gates to what ever you named them in the "function text" in Step 3.
Remember I used "Teleportgate1a" & "Teleportgate2a" but you can name them what ever you want.
Keep in mind that you are changing the datablocks in both the different reload gates. (see example 5a)

Change

Code: Select all

 dataBlock = "Reload";
to 
 dataBlock = "Teleportgate1a"; 
and 
 dataBlock = "Teleportgate2a"; 
respectively
_________________Example: 5a_________________

Code: Select all

 new PowerUp() {
 dataBlock = "Teleportgate1a";<-------------------------------- (Teleportgate1a  datablock)
 position = "0.100 0.100 0.100";<-------------------------------- (Teleportgate1a position)  
 rotation = "0.0 0.0 0.0 0.0";
 scale = "1 1 1";
 lightBoost = "0";
 };
 new PowerUp() {
 dataBlock = "Teleportgate2a";<-------------------------------- (Teleportgate2a datablock)
 position = "0.200 0.200 0.200";<-------------------------------- (Teleportgate2a position) 
 rotation = "0.0 0.0 0.0 0.0";
 scale = "1 1 1";
 lightBoost = "0";
// I made these positions up, you would want to c/p your position into the "function text" (see Step 6.)//
__________________________________________________________________
Step 6. Entering the positions of the gates into the "function text.

This is where people have a hard time so read carefully.
Copy and paste the position of the gate to the opposite name in the "function text".
MEANING: The position of "teleportgate1a" will be the same as the "%newPos =" of "teleportgate2a" and the position of "teleportgate2a" will be the same as the "%newPos =" of "teleportgate1a".
This is because when you go in the "teleportgate1a, you want to come out of "teleportgate2a" and when you go into "teleportgate2a" you want to come out of "teleportgate1a... right.
That's what it is called "newPos" or "new position" in the "function text".

_________________Example:_________________

Code: Select all

Function x1sectorwarp::onenter(%db, %this, %tank)<-------------------------------- (x1 datablock)
 {
 %pos = %tank.getPosition();
 %rot = %tank.Rotation;
 %newPos = ("0.200 0.200 0.200" @ " " @ %rot); <-------------------------------- (x1 position---------------->x2 position) 
 %tank.setTransform(%newPos);
 }
 datablock powerupdata(x1sectorwarp)
 {
 aipickup = 0; 
 emitterduration = 0;
 maxoff = 100; 
 minoff = 50; 
 shadow = 1; 
 shadowanimation = 1;
 shape = "game/data/shapes/common/recharge.dts";
 starton = 0; 
 staticshadow = 0; 
 }; 

Function x2sectorwarp::onenter(%db, %this, %tank) <--------------------------------(x2 datablock)
 {
 %pos = %tank.getPosition();
 %rot = %tank.Rotation;
 %newPos = ("0.100 0.100 0.100" @ " " @ %rot);<-------------------------------- (x2 position ---------------->x1 position)
 %tank.setTransform(%newPos);
 }
 datablock powerupdata(x1sectorwarp)
 {
 aipickup = 0; 
 emitterduration = 0;
 maxoff = 100; 
 minoff = 50; 
 shadow = 1; 
 shadowanimation = 1;
 shape = "game/data/shapes/common/recharge.dts";
 starton = 0; 
 staticshadow = 0; 
 }; 

//--- OBJECT WRITE BEGIN ---
__________________________________________________________________
Now you will be able to transport back and forth between the two transport gates.
Special note: If you understand what you have done, which I pray you have, then you will also realize that the transport gates don't necessarily have to go back and forth.

They can be one way tickets, x1 can go to x2 and x2 can go to x3 and x3 can go to x4 etc. Then back to x1 if you wish
x1-------->x2-------->x3-------->x4-------->xN-------->x1
Just keep track an a piece of paper how you want to map it.

__________________________________________________________________
I know the directions are kind of complicated and a little confusing. I would suggest reading it a few times.

The main thing to understand it the big picture of what you are doing.

"Two way" teloporter gates
position x1 is going to position x2 and then back again from x2 to x1
x1 ---------------> x2 ---------------> x1 ---------------> x2 ---------------> x1 --------------->x2 --------------->x1

Or

"One way" teloporter gates
position x1 is going to position x2 and then to position x3. This can go on for ever or back to x1.
x1 ---------------> x2 ---------------> x3 ---------------> x4 ---------------> x5 --------------->xn --------------->x1

If you understand this principle then the code makes more sense and you will under-stand why the variables are what they are.
User avatar
TYF
New Brainjar
New Brainjar
Posts: 90
Joined: Wed Aug 13, 2008 7:23 am
Location: Shanghai

Re: How to set a teleportgate in the mission?

Post by TYF »

Thankyou very much.
ImageImage
User avatar
Metal
Need Major Repair
Need Major Repair
Posts: 1278
Joined: Fri Dec 26, 2008 5:48 pm

Re: How to set a teleportgate in the mission?

Post by Metal »

WTH!!
I sent a reply with the correct page and it got deleted :? :tankerconfused2:

anyway....if you got it to work then have fun
Post Reply