Forums Index >> Modding >> Expert Modding Questions



Page : <1> :


1. After the first person joins a team battle mode game how do you force the rest to be on the opposet team? If the team has to be set to green (or blue) for the first person that would work.
2.How do you make them change teams when they get hit by the other team?

I think 187 or some one less has done something close to #1 where you force them on a certen team in team battle mode.

Tuesday, January 18, 2005 at 4:41:14 PM

"Hit" is collision, am I correct? The awnser to your first question is that there are a bunch of ways to do that, the simplest yould be to set a variable once someone joins and then make the team changing stuff inside the "onAdd" functions. The game doesn't track collisions the way stock TGE does, so there's no clear awnser to your second question since I don't know enough about ThinkTanks' code to say anything "real" about this. The simplest way would be to make the player shoot an extremely close range weapon (not that hard to make, just track their team and then load the apropriate weapon onto them) Just my first few thoughts on the discrussion.

~Jaj Jr~

Tuesday, January 18, 2005 at 4:56:41 PM

My God, Jaj Jr. Is alive! ;) Good to see ya! I have some code for your questions ßomber, but Art Crazyİ would seriously kill me if I gave it to you!

Tuesday, January 18, 2005 at 7:41:54 PM

Yes, I did mean "hit". Could you be of more detail on the first question. Like what the code (script) would be that I put in the.mis file. And how would I go about making that kind of wepond for the second question?

Wednesday, January 19, 2005 at 7:39:06 PM

You're asking as an "expert modder", right? If you were an expert modder that awnser should be enough - :P I'll do a quick script/tutorial (I love writing tutorials lol) since I "noticed" that you dont "seem" to know that much about modding :)

~Jaj Jr~

Thursday, January 20, 2005 at 4:37:39 PM

The Questions were to an expert not from an expert. You could say I only knw the basics to modding like if you were to tell me a script I would put it in the.mis file and all. I used to know how to make terrains with TGE demo, but couldn't get skins on them. I have no idea how you guys make up your own scripts. I don't know any thing about C++. Yep thats it, I'm sure you know much more.

Last edited: Thursday, January 20, 2005 at 5:26:41 PM

Thursday, January 20, 2005 at 5:18:55 PM

@bomber- do you mean like in the survivor server, where everyone starts out as blue and once killed you change to green? Speaking of which, where is the survivor server? I miss that game sooooooooooo much. As for your question B, I don't know about all that stuff either. I, too, am a simple modder and skin maker but that's all.ck

Friday, January 21, 2005 at 5:07:24 AM

Oh chineseknife The surviver mod is screwed right now! I'd say computer crashing or something and I tried to email -Z- and/or danmacdonald. I wonder whee they are? Come out come out I have a question for you! 8o :[

Friday, January 21, 2005 at 1:26:49 PM

We want Survivor, We want Survivor, We want Survivor!

Red rover
Red rover
Let Survivor come over

One a penny
Two a penny
a sixpence of rye
I wanna playa
Survivor game-a
Pocket full of stones.

XD

Friday, January 21, 2005 at 9:16:51 PM

*weirded out*

 

 

 

 

Saturday, January 22, 2005 at 12:20:44 AM

Warfare-got kids? Then u'll understand!:)

Saturday, January 22, 2005 at 5:47:10 AM

I dont but I want that son of a gun to put surviver back up!

Let us play Surviver! Let us play Surviver! Let us play Surviver!

Saturday, January 22, 2005 at 9:49:10 AM

Let's all e-mail danmac and -z- a gazillion times about it XD ;) just kidding; but it would be nice to play survivor again. If I knew how to set one up I would host one, but alas, I do not. :( ck

Saturday, January 22, 2005 at 2:36:45 PM

Chineseknife Lets do it skrew their computer and when it does get fixed they will answer our questions!

 

Skrew their computer! Skrew their computer!

 

 

Monday, January 24, 2005 at 2:17:14 PM

Here's how to do 2, just copy the following code to a.cs file:

function TankData::onDestroyed(%db,%this,%killer)
{
if(!$pref::Server::SurvivorMode = 1)
{
if ($Game::SinglePlayer)
{
%db.onSPDestroyed(%this,%killer);
return;
}
if ($Game::TargetRange)
{
%db.onTargetDestroyed(%this,%killer);
return;
}

// need to deal with both ai bots and players as killer's and killee's

%client = %this.client;
%client.deaths++;

// echo("killed tank: " @ %this @ ", client: " @ %client);
// echo("killer tank: " @ %killer @ ", client: " @ %killerClient);
if (isObject(%killer))
{
messageAll('MsgClientKilled','%1 has been blown up by %2!',%client.name,%killer.client.name);
if ($Game::MissionType $= "Deathmatch")
{
// this is a score...
if ($Game::TeamGame)
{
if (%killer.client.team.getId() != %client.team.getId())
%killer.incScore(1,1);
%client.team=%killer.client.team;
MessageAll('MsgClientDrop',"",%client.nameBase, %client);
MessageAll('MsgClientJoin',"",%client.nameBase,%client,%client.team,%client.cumScore,0,0,0);
}
else
%killer.incScore(1,1);
}
%killer.client.kills++;
}
else
{
messageAll('MsgClientKilled','%1 is checking out the afterlife!',%client.name);
}

If ($Game::MissionType $= "Deathmatch")
{
if ($Game::TeamGame)
{
if (isObject(%killer) && %killer.client.team.getId() $= %client.team.getId())
// team killer, lose point
%this.incScore(-1,-1);
else
%this.incScore(-1,0);
}
else
%this.incScore(-1,-1);
}
if (!isObject(%client.ai))
{
if ($Game::aiControlMode)
{
%client.player = 0;
%client.schedule(4000,"spawnPlayer");
}
else
commandToClient(%client,'CenterPrint',"You have lost your noggin, press SPACE, and we will gladly find it.", 0, 1 );
}
else
spawnBotPlayer(%client);
}
}


If it's not a teamkill, the killed should go to the team of the killer.

Friday, January 28, 2005 at 8:09:38 AM

And to make everyone go green or blue, here's a Dash Code to do it:

Function teamchangerall(%sender,%team)
{
if(!ClientIsAdmin(%sender,"team-changer command failed you are not admin"))
return;
if($pref::Server::TeamChangers != 1)
{
schedule(1000,false,"CommandToClient", %sender,'BottomPrint', "Team Changing is disabled",4,4);
return;
}
$len = clientgroup.getCount();
for(%i=0; %i<$len; %i++)
{
%client = clientgroup.getObject(%i);
if(%client != -1)
%client.teamchanger(%team);
}
return;

}

 

Add the following to the codeAction function (towards the bottom):


else if (%code $= "/ab" )
call("teamchangerall",%sender,"BlueTeam");
else if (%code $= "/ag" )
call("teamchangerall",%sender,"GreenTeam");
else if (%code $= "/ar" )
call("teamchangerall",%sender,"RedTeam");

/ab turns all players blue, /ag turns them green and /ar makes them red. Admin-only.

Friday, January 28, 2005 at 8:22:35 AM

Page : <1> :

insert quote insert url insert email insert image bold italic underline superscript subscript horizontal rule : : Help on using forum codes

Add comment:

HTML is disabled within comments, but ZBB Code is enabled.

Back to the top

Web site designed, maintained and funded by -z- and Dan MacDonald