Forums Index >> Modding >> for a hockey mod
Page : <1> :
Now I got all of his stuff now how do I make it score a point for a certain team
function HockeyGoal::OnEnter(%this,%db,%tank) // <-- Change "HockeyGoal" to the name of your shape datablock.
{
%team = "GreenTeam"; // What team gets the point
%team.score += 1; // How much to give them
%team.cumScore += 1; // How much to give them
centerprintAll('MsgTeamScoreChanged', "GOAL!", %team.score, %team.cumScore, %team.getId()); // Centerprint message when someone scores
%tank.hurtme(100); // Kill them. Muahaha!
}
}
Last edited: Saturday, May 14, 2005 at 9:24:54 AM
Erm, Chilly, sometimes I think you dont know how to script...
function HockeyGoal::OnEnter(%this,%db,%tank) // <-- Change "HockeyGoal" to the name of your shape datablock.
{
if(%tank.client.namebase !$= "Puck") // Check if the player isnt the ball
{
return; // If he isnt dont do a thing
}
%team = "GreenTeam"; // What team gets the point -- THIS MUST BE FIRST OR THE POINTS WILL BE GIVEN IN VAIN
%team.score += 1; // How much to give them
%team.cumScore += 1; // How much to give them
messageall('MsgTeamScoreChanged', "", %team.score, %team.cumScore, %team.getId()); // Indicate the game that the player list needs to be updated
centerprintall("TOUCHDOWN!!!",4,4); // Tell everyone that a goal was just scored
%tank.hurtme(100); // Kill the bot that is suposed to be a ball. Muahaha!
}
Yes it works thx both of you ;) alot
One more thing I forgot what art said about renaming the game type how do I do that again :o
$Server::Gametype = "Hockey";
Put that on the top of the.mis
Page : <1> :
Ok I stuck on how to make a goal score for a certain team.i know how to make it center print and kill the Puckbot too(it kills my self also how do I stop that).just need it to make a score when the bot dies.