Forums Index >> Modding >> for a hockey mod



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.

Monday, May 09, 2005 at 6:30:46 PM

Well, If you ever went into Chongs Soccer mod you would have the Hockey Goals in your Objects folder. Just put 2 reload gates, one on each end of the pitch and replace the reload gate with the Hockey Goal.

 

 

 

 

Tuesday, May 10, 2005 at 9:13:58 AM

Now I got all of his stuff now how do I make it score a point for a certain team

Saturday, May 14, 2005 at 8:44:31 AM


 

                                        
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

Saturday, May 14, 2005 at 8:54:30 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!
}

 

 


Saturday, May 14, 2005 at 9:23:43 AM

Yes it works thx both of you ;) alot

Saturday, May 14, 2005 at 10:55:52 AM

One more thing I forgot what art said about renaming the game type how do I do that again :o

Saturday, May 14, 2005 at 11:24:48 AM

 

 

                                        
$Server::Gametype = "Hockey";

 


Put that on the top of the.mis


Saturday, May 14, 2005 at 11:44:29 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