The Exiled
http://theexiled.pwnageservers.com/forum/

Territories/Zones
http://theexiled.pwnageservers.com/forum/viewtopic.php?f=4&t=921
Page 1 of 3

Author:  TE-Krogoth [ Fri Dec 30, 2005 4:26 pm ]
Post subject:  Territories/Zones

I'm working on a map, and I want it to be so that if you control the three certain switches for a couple of seconds, you win the match, kind of like a zones or territory game, how would I do that?


I want it to be map based so that the server doesn't need to be modded.

Author:  TE-Braveskin [ Fri Dec 30, 2005 5:02 pm ]
Post subject: 

when you take control of a tower, have it check if the other towers are yours. if they are, have it schedule another check, that checks if all 3 towers are still yours, if they are, win. if not, then it will just not do anything until you gather all towers again.

Author:  TE-Krogoth [ Fri Dec 30, 2005 5:33 pm ]
Post subject: 

Code please, I'm not a modder, just a mapper.

Author:  TE-Hammy [ Fri Dec 30, 2005 6:00 pm ]
Post subject: 

:| ya...!!!!

Author:  Kigen [ Fri Dec 30, 2005 9:04 pm ]
Post subject: 

Actually thats something you add to your map. But it only can be done by scripting a little with your map unfortnately. :-/

Author:  TE-Pengwin [ Fri Dec 30, 2005 9:51 pm ]
Post subject: 

boo

haahhahah

j/k

dunno why i posted here

Author:  TE-Hammy [ Fri Dec 30, 2005 9:57 pm ]
Post subject: 

cause ur a pengwin

feel free to delete my post if nessecary ( ._.)

Author:  TE-Shugo [ Fri Dec 30, 2005 9:59 pm ]
Post subject: 

umm i think you would have to open

objectives.cs inside the mod

and play around with this
Code:
function TowerSwitch::onCollision(%this, %object)
{
   //echo("switch collision ", %object);
   if(getObjectType(%object) != "Player")
      return;

   if(Player::isDead(%object))
      return;

   %playerTeam = GameBase::getTeam(%object);
   %oldTeam = GameBase::getTeam(%this);
   if(%oldTeam == %playerTeam)
      return;

   %this.trainingObjectiveComplete = true;
   
   %playerClient = Player::getClient(%object);
   %touchClientName = Client::getName(%playerClient);
   %group = GetGroup(%this);
   Group::iterateRecursive(%group, GameBase::setTeam, %playerTeam);

   %dropPoints = nameToID(%group @ "/DropPoints");
   %oldDropSet = nameToID("MissionCleanup/TeamDrops" @ %oldTeam);
   %newDropSet = nameToID("MissionCleanup/TeamDrops" @ %playerTeam);

   $deltaTeamScore[%oldTeam] -= %this.deltaTeamScore;
   $deltaTeamScore[%playerTeam] += %this.deltaTeamScore;
   $teamScore[%oldTeam] -= %this.scoreValue;
   $teamScore[%playerTeam] += %this.scoreValue;

   if(%dropPoints != -1)
   {
      for(%i = 0; (%dropPoint = Group::getObject(%dropPoints, %i)) != -1; %i++)
      {
         if(%oldDropSet != -1)
            removeFromSet(%oldDropSet, %dropPoint);
         addToSet(%newDropSet, %dropPoint);
      }
   }

   if(%oldTeam == -1)
   {
      MessageAllExcept(%playerClient, 0, %touchClientName @ " claimed " @ %this.objectiveName @ " for the " @ getTeamName(%playerTeam) @ " team!");
      Client::sendMessage(%playerClient, 0, "You claimed " @ %this.objectiveName @ " for the " @ getTeamName(%playerTeam) @ " team!");
    }
   else
   {
      if(%this.objectiveLine)
      {
         MessageAllExcept(%playerClient, 0, %touchClientName @ " captured " @ %this.objectiveName @ " from the " @ getTeamName(%oldTeam) @ " team!");
         Client::sendMessage(%playerClient, 0, "You captured " @ %this.objectiveName @ " from the " @ getTeamName(%oldTeam) @ " team!");
         %this.numSwitchTeams++;   
         schedule("TowerSwitch::timeLimitCheckPoints(" @ %this @ "," @ %playerClient @ "," @ %this.numSwitchTeams @ ");",60);
      }
   }
   if(%this.objectiveLine)
   {
      TeamMessages(1, %playerTeam, "Your team has taken an objective.~wCapturedTower.wav");
      TeamMessages(0, %playerTeam, "The " @ getTeamName(%playerTeam) @ " has taken an objective.");
      if(%oldTeam != -1)
         TeamMessages(1, %oldTeam, "The " @ getTeamName(%playerTeam) @ " team has taken your objective.~wLostTower.wav");
      ObjectiveMission::ObjectiveChanged(%this);
   }
   ObjectiveMission::checkScoreLimit();
}

Author:  TE-Pengwin [ Fri Dec 30, 2005 9:59 pm ]
Post subject: 

nah

im lazy

Author:  TE-Shugo [ Fri Dec 30, 2005 10:07 pm ]
Post subject: 

XD

Page 1 of 3 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/