OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Terox on 29 Jan 2003, 09:06:15

Title: How to show text message to those who activated trigger only
Post by: Terox on 29 Jan 2003, 09:06:15
How do i display a message that is only visible to those that activated a trigger and nobody else???????????

Lets say a titletext message


1) A player that activates a trigger

2) The occupants of a vehicle that activated a trigger

to make it easy lets say this is the message
For the Vehicle
titleText[format["Mayday! Mayday!\n we are Going down",Plain down"]

(I want to use it in conjunction with the "Failed Tail rotor script, triggered when the vehicle suffers X amount of damage)

And displayed to the individual
titleText[format["%1\n You tripped a Bouncing Betty",name (thisList select 0)],"Plain down"]



and is it possible to display a message using the "Yellow" Vehicle Chatbox
or similar so that its more distinct
Title: Re:How to show text message to those who activated trigger only
Post by: Sefe on 29 Jan 2003, 14:17:36
Try:

if (Player in thisList) then {titleText[format["%1\n You tripped a Bouncing Betty",name (thisList select 0)],"Plain down"]}
Title: Re:How to show text message to those who activated trigger only
Post by: Sefe on 29 Jan 2003, 14:20:40
Oh, I missed the second question. You can use the vehicleChat and vehicleRadio commands. One of them (I think it's vehicleChat) doesn't seem to work properly. But the other one will work.
Title: Re:How to show text message to those who activated trigger only
Post by: Terox on 29 Jan 2003, 17:32:55
Thx m8
Title: Re:How to show text message to those who activated trigger only
Post by: Terox on 09 Feb 2003, 18:39:58
I am having problems getting the titletext in
#medic
#exit1
and
#serum to run

The initial titletext line displays ok, as it should, naming the player who activated this script

The other text messages are also required to run and be displayed only on the players screen who activated the trigger that activated this script


I cant understand why the rest dont.  As well as giving me the fix, could somebody also explain why the lines are not working



Quote
if (Player in thisList) then {titleText[format["%1\n You have been bitten by a snake\n Seek medical attention ASAP!!",name (thisList select 0)],"Plain down"]}
~3
#loop

player setdammage ((getdammage player) + 0.1)
?(getdammage player == 1): goto "exit1"
~30
?(getdammage player == 0): goto "serum"
?(getdammage player == 0.7): goto "medic"
goto "loop"
#serum
if (Player in thisList) then {titleText[format["%1\n you have been given the anti venom serum\n Carry On soldier!",name (thisList select 0)],"Plain down"]}
~3
goto "exit2"

#exit1
if (Player in thisList) then {titleText[format["%1\n You died from the snakebite",name (thisList select 0)],"Plain down"]}
~3
goto "exit2"
#medic
if (Player in thisList) then {titleText[format["%1\n you need a medic\n BIG TIME!!!!!!!",name (thisList select 0)],"Plain down"]}
goto "loop"#

#exit2
end



Thanks