Forums Index >> General >> Rotating Kill Messages



Page : <1> :


I've noticed some servers, like CTF, have rotating kill messages: has been sent to the morgue, has been annhilated, etc....I was wondering how do you make rotations like that? I know how to change the message, but how do you do two or more of them? Thanks.

_ND_

Sunday, June 12, 2005 at 3:43:08 AM
b20

Oh boy, I searched and searched for it, but no luck. I went to PTT search and the modding resource but no luck.

It may be that you have to make more commands in the Tank2.cs about the "Your brain... Blah blah blah" but I have no idea what position you have to put those commands in. :S

I think some old timers here can hitch up the old centerprint rotation.

- b20

Sunday, June 12, 2005 at 8:00:35 AM

Add a server::pref, and increment it everytime someone dies. Then, set up an array of string constants containing the messages, and index it with the pref. Just remember to zero it each time in the server/prefs file.

Sunday, June 12, 2005 at 1:16:08 PM

Hmm will they be able to do that :P?


Sunday, June 12, 2005 at 5:34:20 PM

Haha Art. I'm pretty close to knowing exactly what I'm doing most of the time. But where's the line of code Wings? :o

Sunday, June 12, 2005 at 5:37:25 PM

Idk, make it up.

Sunday, June 12, 2005 at 5:39:07 PM
b20

Man -z- knows EVERYTHING about ThinkTanks! Where is that guy?! :)

- b20

Last edited: Sunday, June 12, 2005 at 6:40:32 PM

Sunday, June 12, 2005 at 6:40:11 PM

He does.....
I could do this if I had my computer instead of my mothers INSANE LAPTOP :P

 

 

 

 

Monday, June 13, 2005 at 6:49:13 PM

One of the bravetree related scripts has the kill messages somewhere...i cant remember and im at work where there aint no TT :)

You could just make up a bunch of different messages and assign each a number. Then use a random number to display the kill message at random. I dont know what the random function is so ill use random(); as an example. I have never used it and dont know the syntax nor torque syntax.

 

                                        

String randomkill() //assume 10 different kill messages
{
char[] msg; //array to store messages
msg[1] = "Your brain has been popped by Bolo...again";
msg[2] = "your dead";
msg[3] = "messages";
...
msg[10] = "mesg10";
Int index = random();
//assume random is a torque function that returns a random integer within the range we have messages for...i.e. 1 - 10...
Return msg[index];
}

 

Instead of centerprint("Your brain has....");
change it to centerprint(randomkill);

Make it torque friendly I might do if I get MORE bored....

B

Monday, June 13, 2005 at 7:04:58 PM


 

                                        
function randomkill()
{
%msg[0] = "Your brain has been popped by Art Crazy...again"; //I edited this line a bit, hope you dont mind :)
%msg[1] = "your dead";
%msg[3] = "messages";
...
%msg[10] = "mesg10";
%num = getRandom(9);
return %msg[%num];
}

 

 


Last edited: Monday, June 13, 2005 at 9:15:12 PM

Monday, June 13, 2005 at 9:14:42 PM

Surviving without -z- is tough

Cloud

Monday, June 13, 2005 at 9:31:09 PM

Page : <1> :

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