OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Terox on 09 Feb 2003, 11:45:14

Title: Titletext message to those in same vehicle
Post by: Terox on 09 Feb 2003, 11:45:14
I have a veh respawn script specifically for choppers,
that when the damage to the chopper (_vcl) damage  is between x and y amount, it runs thje following code


Quote

blah blah blah : goto "rotorfail"

#rotorfail
Hint "Tail rotor dead"  This is just a temporary debug line
[_vcl, true, 1] exec "effects\tailrotor.sqs"

if (Player in thisList) then { vehicleRadio [format["Mayday!\n Mayday\n"We lost the tail rotor\nWe are going down",name (thisList select 0)],"Plain down"]    This is my problem statement

~30
goto "end"


My problem is that i am trying to send a titletext message to all in the vehicle and the line is bugged
Even better if its possible to do it in yellow vehicle chat



This is the error statement
if (Player in thisList) then {l#l vehicleRadio [format["Mayday!\n Mayday\n"We lost the tail rotor\nWe are going down",name (thisList select 0)],"Plain down"]


After i get this bit working then i want to add a warning wav, again only audible to those in the chopper (_vcl)  so any tips on thos would also be appreciated


Thx
Title: Re:Titletext message to those in same vehicle
Post by: Sui on 10 Feb 2003, 01:00:46
Hey Terox... me again :)

If you want it in titletext (white writing down the bottom of the screen) I suggest this line here:

if (Player in thisList) then { titletext [format["Mayday!\n Mayday\n"We lost the tail rotor\nWe are going down",name (thisList select 0)],"Plain down"]  }

or even:

? (Player in thisList) :  titletext [format["Mayday!\n Mayday\n"We lost the tail rotor\nWe are going down",name (thisList select 0)],"Plain down"]

If you want it in vehicle chat (yellow writing like a radio message), try:

if (Player in thisList) then { vehiclechat format ["Mayday!\n Mayday\n"We lost the tail rotor\nWe are going down",name (thisList select 0)] }

or:

? (Player in thisList) : vehiclechat format["Mayday!\n Mayday\n"We lost the tail rotor\nWe are going down",name (thisList select 0)]

The difference between the ? : and the if then statements isn't much... except in the latter you'll need some { } around the then statement. In the former, you don't ;)

See if any of those fixes your problem.  
Title: Re:Titletext message to those in same vehicle
Post by: Terox on 10 Feb 2003, 01:29:03
Thanks again, thats great