Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

scripting

Page: 1 of 1
 Mr. Chopper
11-25-2003, 12:07 AM
#1
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:
 Kengo
11-25-2003, 9:14 AM
#2
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...
 lassev
11-25-2003, 3:29 PM
#3
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!
 Kengo
11-25-2003, 6:27 PM
#4
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:
 lauser
11-26-2003, 3:29 PM
#5
Except for players name I could have told you that Chopp.;)
 Mr. Chopper
11-26-2003, 3:59 PM
#6
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.
 shukrallah
11-29-2003, 7:36 PM
#7
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.
 WadeV1589
11-29-2003, 8:05 PM
#8
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.
Page: 1 of 1