The Exiled

Shunned by Man, Accepted by Gods
* FAQ    * Search   * Members
* Login   * Register
It is currently Thu Mar 28, 2024 9:04 am 

 View unanswered posts | View active topics


 Board index » General Area » Modding
Post new topic Reply to topic Users browsing this forum: No registered users and 4 guests
Author
Message
TE-Braveskin

Joined: Thu Aug 11, 2005 3:28 am
Posts: 1176
Post Posted: Tue Jan 03, 2006 4:09 pm    Post subject:
Reply with quote
 
I guess I'll do this, but I need you to do 3 things. Change your towers with these:

Code:
instant StaticShape "Switch <!>" {
         dataBlock = "TowerSwitch";
         name = "PushSwitch";
         position = "-176.681 -348.192 184.242";
         rotation = "0 0 0";
         destroyable = "True";
         deleteOnDestroy = "False";
         objectiveLine = "17";
         scoreValue = "1";
      };
      instant StaticShape "Switch |WAR|" {
         dataBlock = "TowerSwitch";
         name = "WARSwitch";
         position = "908.315 -20.5509 184.241";
         rotation = "0 0 0";
         destroyable = "True";
         deleteOnDestroy = "False";
         objectiveLine = "18";
         scoreValue = "1";
      };
      instant StaticShape "Switch TE" {
         dataBlock = "TowerSwitch";
         name = "TESwitch";
         position = "256.278 741.218 184.239";
         rotation = "0 0 0";
         destroyable = "True";
         deleteOnDestroy = "False";
         objectiveLine = "19";
         scoreValue = "1";
      };


then add this to the bottom:
Code:
$teamScoreLimit = 1337;

function CheckOwnedTowers(%team)
{
if($OwnsPushSwitch == %team && $OwnsPushSwitch == %team && $OwnsTESwitch == %team)
{
teammessages(3,gamebase::getteam(%client),"Your team has won!");
messageall(1,"The "@getTeamName(%team)@" has won!");      
$TeamScore[%team] = 1337;
ObjectiveMission::checkScoreLimit();   
}   
}   

function TESwitch::onCollision(%this,%object)
{
%tower = %this;// Confusion, Be gone! -Braveskin
%firstTeam = gamebase::getteam(%tower);   
if(getObjectType(%object) == "Player")
{
%client = player::getclient(%object);   
if(gamebase::getteam(%client)!=gamebase::getteam(%tower))
{
teammessages(3,gamebase::getteam(%client),"Your team is now in control of the TE Switch.~wCapturedTower.wav");   
if(%firstteam != -1)
{
teammessages(3,%firstteam,client::getname@" has stolen the TE Switch from your team!");   
}
messageall(0,"The "@getTeamName(gamebase::getteam(%client))@" team is now in control of the TE Switch.");
gamebase::setteam(%tower,gamebase::getteam(%client));   
$OwnsTESwitch = gamebase::getteam(%client);
if($OwnsPushSwitch == gamebase::getteam(%client) && $OwnsWarSwitch == gamebase::getteam(%client))
{
messageall(1,"The "@getTeamName(gamebase::getteam(%client))@" team has 20 seconds to win! Take those towers!");
%team = gamebase::getteam(%client);
schedule("CheckOwnedTowers("@%team@");",20);   
}   
}   
}
}

function WARSwitch::onCollision(%this,%object)
{
%tower = %this;// Confusion, Be gone! -Braveskin
%firstTeam = gamebase::getteam(%tower);   
if(getObjectType(%object) == "Player")
{
%client = player::getclient(%object);   
if(gamebase::getteam(%client)!=gamebase::getteam(%tower))
{
teammessages(3,gamebase::getteam(%client),"Your team is now in control of the |WAR| Switch.~wCapturedTower.wav");   
if(%firstteam != -1)
{
teammessages(3,%firstteam,client::getname@" has stolen the |WAR| Switch from your team!");   
}
messageall(0,"The "@getTeamName(gamebase::getteam(%client))@" team is now in control of the |WAR| Switch.");
gamebase::setteam(%tower,gamebase::getteam(%client));   
$OwnsWARSwitch = gamebase::getteam(%client);
if($OwnsPushSwitch == gamebase::getteam(%client) && $OwnsWarSwitch == gamebase::getteam(%client))
{
messageall(1,"The "@getTeamName(gamebase::getteam(%client))@" team has 20 seconds to win! Take those towers!");
%team = gamebase::getteam(%client);
schedule("CheckOwnedTowers("@%team@");",20);   
}   
}   
}
}

function PushSwitch::onCollision(%this,%object)
{
%tower = %this;// Confusion, Be gone! -Braveskin
%firstTeam = gamebase::getteam(%tower);   
if(getObjectType(%object) == "Player")
{
%client = player::getclient(%object);   
if(gamebase::getteam(%client)!=gamebase::getteam(%tower))
{
teammessages(3,gamebase::getteam(%client),"Your team is now in control of the <!> Switch.~wCapturedTower.wav");   
if(%firstteam != -1)
{
teammessages(3,%firstteam,client::getname@" has stolen the <!> Switch from your team!");   
}
messageall(0,"The "@getTeamName(gamebase::getteam(%client))@" team is now in control of the <!> Switch.");
gamebase::setteam(%tower,gamebase::getteam(%client));   
$OwnsPushSwitch = gamebase::getteam(%client);
if($OwnsPushSwitch == gamebase::getteam(%client) && $OwnsWarSwitch == gamebase::getteam(%client))
{
messageall(1,"The "@getTeamName(gamebase::getteam(%client))@" team has 20 seconds to win! Take those towers!");
%team = gamebase::getteam(%client);
schedule("CheckOwnedTowers("@%team@");",20);   
}   
}   
}
}


 Top Offline
Profile
Author
Message
TE-Braveskin

Joined: Thu Aug 11, 2005 3:28 am
Posts: 1176
Post Posted: Tue Jan 03, 2006 4:09 pm    Post subject:
Reply with quote
 
I know it works, I tested it myself.

 Top Offline
Profile
Author
Message
TE-Krogoth


User avatar
Joined: Tue Jun 07, 2005 8:01 am
Posts: 2092
Location: Texas
Post Posted: Tue Jan 03, 2006 7:43 pm    Post subject:
Reply with quote
 
It works more than the other one did, but not exactly.

It seems to start the count down whenever I have control of any two switches.

Code:
MSG: "=**TE**=Krogoth joined team The Exiled."
Executing missions\Copy of Damn_Tarts.dsc.
teamMessages 1, 0, Your team has taken an objective.~wCapturedTower.wav, , ,
teamMessages 0, 0, The The Exiled has taken an objective., , ,
MSG: "You claimed The Defense Platform for the The Exiled team!"
MSG: "Your team has taken an objective."
MSG: "The The Exiled has taken an objective."
teamMessages 3, 0, Your team is now in control of the TE Switch.~wCapturedTower.wav, , ,
MSG: "Your team is now in control of the TE Switch."
MSG: "The The Exiled team is now in control of the TE Switch."
MSG: "The The Exiled team has 20 seconds to win! Take those towers!"
Syntax error in input.
teamMessages 3, -1, Your team has won!, , ,
GAME: teamfinalscore 0 1337
GAME: teamfinalscore 1 0
GAME: teamfinalscore 2 0
Changing to mission D R O P Z O N E_2 0 0 5.


The defense platform switch isn't supposed to be part of the territories.



Image
Image
 Top Offline
Profile WWWYIM
Author
Message
TE-Noxwizard


User avatar
Joined: Tue Jun 07, 2005 5:59 pm
Posts: 942
Location: Texas
Post Posted: Tue Jan 03, 2006 7:55 pm    Post subject:
Reply with quote
 
I see it.


Code:
function CheckOwnedTowers(%team)
{
if($OwnsPushSwitch == %team && $OwnsPushSwitch == %team && $OwnsTESwitch == %team)
{
teammessages(3,gamebase::getteam(%client),"Your team has won!");
messageall(1,"The "@getTeamName(%team)@" has won!");     
$TeamScore[%team] = 1337;
ObjectiveMission::checkScoreLimit();   
}   
}


He's got the PushSwitch twice, it needs to be:
Code:
function CheckOwnedTowers(%team)
{
    if($OwnsPushSwitch == %team && $OwnsWARSwitch == %team && $OwnsTESwitch == %team)
    {
        teammessages(3,gamebase::getteam(%client),"Your team has won!");
        messageall(1,"The "@getTeamName(%team)@" has won!");
        $TeamScore[%team] = 1337;
        ObjectiveMission::checkScoreLimit();
    }
}



Image
Image
 Top Offline
Profile WWWICQYIM
Author
Message
TE-Noxwizard


User avatar
Joined: Tue Jun 07, 2005 5:59 pm
Posts: 942
Location: Texas
Post Posted: Tue Jan 03, 2006 8:43 pm    Post subject:
Reply with quote
 
Just noticed some more duplicate areas. Try this:
Code:
// Territory/Zone Map Code created by Braveskin

$teamScoreLimit = 1337;

function CheckOwnedTowers(%team)
{
    if($OwnsPushSwitch == %team && $OwnsWARSwitch == %team && $OwnsTESwitch == %team)
    {
        teammessages(3,gamebase::getteam(%client),"Your team has won!");
        messageall(1,"The "@getTeamName(%team)@" has won!");
        $TeamScore[%team] = 1337;
        ObjectiveMission::checkScoreLimit();
    }
}

function TESwitch::onCollision(%this,%object)
{
    %tower = %this;// Confusion, Be gone! -Braveskin
    %firstTeam = gamebase::getteam(%tower);
   
    if(getObjectType(%object) == "Player")
    {
        %client = player::getclient(%object);
       
        if(gamebase::getteam(%client)!=gamebase::getteam(%tower))
        {
            teammessages(3,gamebase::getteam(%client),"Your team is now in control of the TE Switch.~wCapturedTower.wav");
        }
           
        if(%firstteam != -1)
        {
        teammessages(3,%firstteam,client::getname@" has stolen the TE Switch from your team!");
        }
       
        messageall(0,"The "@getTeamName(gamebase::getteam(%client))@" team is now in control of the TE Switch.");
        gamebase::setteam(%tower,gamebase::getteam(%client));
        $OwnsTESwitch = gamebase::getteam(%client);

        if($OwnsPushSwitch == gamebase::getteam(%client) && $OwnsWarSwitch == gamebase::getteam(%client))
        {
            messageall(1,"The "@getTeamName(gamebase::getteam(%client))@" team has 20 seconds to win! Take those towers!");
            %team = gamebase::getteam(%client);
            schedule("CheckOwnedTowers("@%team@");",20);
        }
    }
}

function WARSwitch::onCollision(%this,%object)
{
    %tower = %this;// Confusion, Be gone! -Braveskin
    %firstTeam = gamebase::getteam(%tower);

    if(getObjectType(%object) == "Player")
    {
        %client = player::getclient(%object);

        if(gamebase::getteam(%client)!=gamebase::getteam(%tower))
        {
            teammessages(3,gamebase::getteam(%client),"Your team is now in control of the |WAR| Switch.~wCapturedTower.wav");
        }
       
        if(%firstteam != -1)
        {
            teammessages(3,%firstteam,client::getname@" has stolen the |WAR| Switch from your team!");
        }
           
        messageall(0,"The "@getTeamName(gamebase::getteam(%client))@" team is now in control of the |WAR| Switch.");
        gamebase::setteam(%tower,gamebase::getteam(%client));
        $OwnsWARSwitch = gamebase::getteam(%client);

        if($OwnsPushSwitch == gamebase::getteam(%client) && $OwnsTESwitch == gamebase::getteam(%client))
        {
            messageall(1,"The "@getTeamName(gamebase::getteam(%client))@" team has 20 seconds to win! Take those towers!");
            %team = gamebase::getteam(%client);
            schedule("CheckOwnedTowers("@%team@");",20);
        }
    }
}

function PushSwitch::onCollision(%this,%object)
{
    %tower = %this;// Confusion, Be gone! -Braveskin
    %firstTeam = gamebase::getteam(%tower);
   
    if(getObjectType(%object) == "Player")
    {
        %client = player::getclient(%object);
       
        if(gamebase::getteam(%client)!=gamebase::getteam(%tower))
        {
        teammessages(3,gamebase::getteam(%client),"Your team is now in control of the <!> Switch.~wCapturedTower.wav");
        }

        if(%firstteam != -1)
        {
            teammessages(3,%firstteam,client::getname@" has stolen the <!> Switch from your team!");
        }

        messageall(0,"The "@getTeamName(gamebase::getteam(%client))@" team is now in control of the <!> Switch.");
        gamebase::setteam(%tower,gamebase::getteam(%client));
        $OwnsPushSwitch = gamebase::getteam(%client);

        if($OwnsTESwitch == gamebase::getteam(%client) && $OwnsWARSwitch == gamebase::getteam(%client))
        {
            messageall(1,"The "@getTeamName(gamebase::getteam(%client))@" team has 20 seconds to win! Take those towers!");
            %team = gamebase::getteam(%client);
            schedule("CheckOwnedTowers("@%team@");",20);
        }
    }
}



Image
Image
Last edited by TE-Noxwizard on Wed Jan 04, 2006 8:54 am, edited 1 time in total.
 Top Offline
Profile WWWICQYIM
Author
Message
TE-Hammy


User avatar
Joined: Thu Jul 14, 2005 5:43 pm
Posts: 3204
Post Posted: Tue Jan 03, 2006 9:36 pm    Post subject:
Reply with quote
 
nox... ^.^


This is not the sandwich you are looking for. Move along.
Image
Ze Sechs-fire wrote:
[22:00] [df]Braveskin: Can AfroMuffin spend the night at my house?
[22:00] [df]Braveskin: I have movize
[22:00] Hammy: No. You'll touch him.
[22:00] Hammy: With gusto.
[22:00] Hammy: He's not even a day old, pedophile.
[22:00] Hammy: >:l
[22:00] [df]Braveskin: plez!!
 Top Offline
Profile
Author
Message
TE-Braveskin

Joined: Thu Aug 11, 2005 3:28 am
Posts: 1176
Post Posted: Tue Jan 03, 2006 10:49 pm    Post subject:
Reply with quote
 
Yeah, just rip credit out of my hands. I would've seen it.

 Top Offline
Profile
Author
Message
TE-Krogoth


User avatar
Joined: Tue Jun 07, 2005 8:01 am
Posts: 2092
Location: Texas
Post Posted: Wed Jan 04, 2006 8:49 am    Post subject:
Reply with quote
 
No worries Brave, you'll still get full credit it for it.

Three points go to Shugo for helping with this.
Five points go to Braveskin for getting it to work.

Thanks for looking into this, I posted it on the Anni forum, but no one helped me.

Thanks to those points, that gave you each enough for a promotion.

Braveskin and Shugo are now Squires. Weird, Braveskin should have been a Squire now, not sure why you weren't informed. Brave, you need five more points for your next promotion to Knight, and Shugo, you need 15 points for your next promotion to Knight.



Image
Image
 Top Offline
Profile WWWYIM
Author
Message
TE-Noxwizard


User avatar
Joined: Tue Jun 07, 2005 5:59 pm
Posts: 942
Location: Texas
Post Posted: Wed Jan 04, 2006 8:55 am    Post subject:
Reply with quote
 
There we go, I gave you credit at the top. All I did was space it out so I could see where the missing } needed to go.


Image
Image
 Top Offline
Profile WWWICQYIM
Display posts from previous:  Sort by  
Post new topic Reply to topic Board index » General Area » Modding
Previous topic :: Next topic  
Go to page Previous  1, 2, 3
Page 3 of 3
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group