Text

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
thestrokes1251
Lance Corporal
Posts: 19
Joined: Sun Jan 30, 2005 1:05 am
Location: Long Island, New York

Text

Post 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-)
ZITO
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
thestrokes1251
Lance Corporal
Posts: 19
Joined: Sun Jan 30, 2005 1:05 am
Location: Long Island, New York

Post by thestrokes1251 »

Huh???
ZITO
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Post Reply