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.

Team Teleporters

Modding questions, answers, help.....

Moderators: Warfare, Moderator, Admin

Mr Phobik
Site Mechanic
Site Mechanic
Posts: 283
Joined: Wed Apr 30, 2008 2:35 pm
Location: Toronto, CANADA

Team Teleporters

Post by Mr Phobik »

Is it possible to have 2 Teleporters, 1 of them to be only for the blue team and the other for the green team? If so, How?
Image
DJ Wings
Need Major Repair
Need Major Repair
Posts: 895
Joined: Thu Dec 28, 2006 9:01 am
Location: Places... Places.

Re: Team Teleporters

Post by DJ Wings »

Simple. I have no idea how to do the modeling, but it can definitely be done. Post the code you're using for the teleporters and I'll make it work for teams.
Never really gone, never really part of the game.
Mr Phobik
Site Mechanic
Site Mechanic
Posts: 283
Joined: Wed Apr 30, 2008 2:35 pm
Location: Toronto, CANADA

Re: Team Teleporters

Post by Mr Phobik »

Here's the Code..

EDIT:

Code: Select all

function teleportgate1a::onenter(%db, %this, %tank)
{
%pos = %tank.getPosition();
%rot = %tank.Rotation;
%newPos = ("760.71 -206.918 216.047" @ " " @ %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; 
};



Thanks...
Last edited by Mr Phobik on Thu Jul 03, 2008 11:03 am, edited 1 time in total.
Image
DJ Wings
Need Major Repair
Need Major Repair
Posts: 895
Joined: Thu Dec 28, 2006 9:01 am
Location: Places... Places.

Re: Team Teleporters

Post by DJ Wings »

Code: Select all

function teleportgate1a::onenter(%db, %this, %tank)
{
   if(%tank.client.team $= "BlueTeam") //or GreenTeam
   {
      %pos = %tank.getPosition();
      %rot = %tank.Rotation;
      %newPos = ("760.71 -206.918 216.047" @ " " @ %rot);
      %tank.setTransform(%newPos);
   }
}
I'm pretty sure this will work. By the way, please, use the [ code ] tag in the future.
Never really gone, never really part of the game.
Mr Phobik
Site Mechanic
Site Mechanic
Posts: 283
Joined: Wed Apr 30, 2008 2:35 pm
Location: Toronto, CANADA

Re: Team Teleporters

Post by Mr Phobik »

Thanks alot it works, But what about having a message said Saying for example.."This Teleporter is only for the Blue Team" To the green team if they enter it?
Image
DJ Wings
Need Major Repair
Need Major Repair
Posts: 895
Joined: Thu Dec 28, 2006 9:01 am
Location: Places... Places.

Re: Team Teleporters

Post by DJ Wings »

Code: Select all

function teleportgate1a::onenter(%db, %this, %tank)
{
   if(%tank.client.team $= "BlueTeam") //or GreenTeam
   {
      %pos = %tank.getPosition();
      %rot = %tank.Rotation;
      %newPos = ("760.71 -206.918 216.047" @ " " @ %rot);
      %tank.setTransform(%newPos);
   }
   else
   {
      centerprint(%tank.client, "This teleporter is only for the Blue team!", 4, 4);
   }
}
Never really gone, never really part of the game.
Mr Phobik
Site Mechanic
Site Mechanic
Posts: 283
Joined: Wed Apr 30, 2008 2:35 pm
Location: Toronto, CANADA

Re: Team Teleporters

Post by Mr Phobik »

Sweet! Thanks Alot.
Image
User avatar
Dazzle
Evil Site Admin
Evil Site Admin
Posts: 1320
Joined: Fri Dec 29, 2006 6:59 am
Location: London, England

Re: Team Teleporters

Post by Dazzle »

Most impressed DJ, the newer version is much better than the old version GJ :thumbup:

Who is online

Users browsing this forum: ClaudeBot [Bot] and 13 guests