Page 1 of 1

Text

Posted: Sun Feb 06, 2005 7:33 pm
by thestrokes1251
How do I get it to say, "Private Johnson has been killed in action" when one of my guys dies in single player? 8-)

Posted: Sun Feb 06, 2005 8:58 pm
by lizardkid

Code: Select all

iprintlbold_noloc "Private Johnson was killd in action"

Code: Select all

iprintln "Private Johnson was killed in action."

Code: Select all

centerprint "Private Johnson was killed in action."
first says it with white, and clicking sound.
second says it with no sound and in orangeish.
third prints in white, no sound, to the middle of your screen.

to make it work you need a listener thread, call from end of main thread.

Code: Select all

JohnsonDeathListener:

$johnson waittill death
iprintlbold_noloc "Private Johnson was killd in action"
// any other code related to the incident here.
end

Posted: Mon Feb 07, 2005 8:24 pm
by thestrokes1251
Huh???

Posted: Mon Feb 07, 2005 9:30 pm
by lizardkid
first one says it under teh compass in white, with clicking.
second one says it under compass in yellowish with no sound
third one prints to middle of screen. they all say teh same thing.

to make it work you need to tell it to wait til the guy has died, so after your main thread put this in your script.

Code: Select all

JohnsonDeathListener: 

$johnson waittill death 
iprintlbold_noloc "Private Johnson was killd in action" 
// any other code related to the incident here. 
end
so your whole script hould look liek this

Code: Select all

main:

level waittill prespawn
level waittill spawn

thread JohnsonDeathListener
end

JohnsonDeathListener: 

$johnson waittill death 
iprintlbold_noloc "Private Johnson was killed in action" 

// any other code related to the incident here. 

end
make sure your guy's $targetname is $johnson.