Okay I'm an absolute n00b at scripting, so bear with me. How do I write a script that will print a message on the screen with a player's name in it! i.e.
"Mr. Chopper wins!"
:confused:
Check these tutorials:
http://www.geocities.com/kengomaps/tutorials.html)
For getting started on scripting.
You can use target_print in Radiant to print messages however, and I haven't found any way of doing the same thing through scripting except to use a target_print in Radiant, so although scripting is uesful it may not be so handy for this situation. Not sure how you'd set it to change depending on the player name...
There's a print command in scripting, all right. Just use it to print whatever stuff on the screen you want. That Kengo said he found no way to do it in scripting means only that in JO he forgot to insert an exclamation mark in front of the actual text. Check the example from one of my Lighthouse scripts below:
print ( "!Please shut down the energy converter to avoid radiation leakage." );
This doesn't mean you would have to use the exclamation mark also in JA, but it's a little effort to try it out. And I have no idea how to print the player name. I don't map MP, and probably never will.
Haven fun time scripting!
Originally posted by lassev
There's a print command in scripting, all right. Just use it to print whatever stuff on the screen you want. That Kengo said he found no way to do it in scripting means only that in JO he forgot to insert an exclamation mark in front of the actual text.
Curses! Man, another mistake on my part, thanks for correcting me Lasse :) What I meant to say is...err...yes, you can do it. :cool:
Except for players name I could have told you that Chopp.;)
Well I know how to do THAT... :P I just can't figure out how to find the player's name and print it on the screen.
thats something ive been wondering too... i know i saw a kill tracker (no, i dont use it) but when you wanted to type the message like (i killed [player name]) you would put a %n for the person you killed... might work, or it might just be the kill tracker code, ive been meaning to try it out though, just never did.
Kill trackers watch the console output to see what happened, they know who you killed because the console says so, scripting inside the game does not work the same way.