bomb messages

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Hell_Soldier
Sergeant
Posts: 74
Joined: Tue Aug 24, 2004 7:40 pm

bomb messages

Post by Hell_Soldier »

how do i do in script that when a bomb is blown text will appear notifing that the bomb exploded.

like if u destory a flak88 then a message will come up and say "the flak88 was destroyed"
Ric-hard
Sergeant Major
Posts: 102
Joined: Sun Feb 29, 2004 6:44 am
Location: sweden
Contact:

Post by Ric-hard »

thread global/message_print.scr::message "The flak88 was destroyed!"

Appears as white text in the middle of the screen.
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

And to know when the bomb has blown, do this:

Code: Select all

while($targetname_of_your_bomb.exploded != 1) {
	waitframe
}
thread global/message_print.scr::message "The flak88 was destroyed!"
Admin .MAP Forums
Image
Head above heels.
Hell_Soldier
Sergeant
Posts: 74
Joined: Tue Aug 24, 2004 7:40 pm

Post by Hell_Soldier »

do i need to make a thread for this?
Hell_Soldier
Sergeant
Posts: 74
Joined: Tue Aug 24, 2004 7:40 pm

Post by Hell_Soldier »

k thx guys.

i did it in a thread, and put the message under the compass rather in the middle:

Code: Select all

bomb1_exploded:

while($flak_bomb.exploded != 1) { 
waitframe 
} 
iprintlnbold_noloc "The flak88 was destroyed!"

end
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Yes, as execution of the script will not go past that point until the bomb has exploded, putting it in a separate thread is a good idea.
Admin .MAP Forums
Image
Head above heels.
Post Reply