Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Making a other client see text  (Read 1693 times)

0 Members and 1 Guest are viewing this topic.

RDX

  • Guest
Making a other client see text
« on: 10 Jan 2005, 23:40:33 »
Hi
In my mission I need to make a player trigger a script and then display a TitleText  to all the players.

This is how I have solved it.
Code: [Select]
init.sqs:
TextMsg=""; PublicVariable "TextMsg"
>all are running this script and declare a public varible.


A player trigger a script through the action menu
Code: [Select]
Strike.sqs:
TextMsg= format["Airstrike in %1 sec!", _Count]; publicVariable "TextMsg"
~1.5
>This change the text from "" to "Airâ€Â¦"

all clients is runing the script ShowMsg.sqs, it is started from the init.sqs
Code: [Select]
ShowMsg.sqs:
#loop
@TextMsg!=""
TitleText [TextMsg,"PLAIN DOWN"]
~1
TextMsg=""
GoTo "Loop"
Exit
>This should wait until the varible TextMsg is set to a sting and then display the text.

â€Â¦but it don't work. When you play it on the server, the text shows to the player that activated it, but not to the rest. I have no idea how to make it work, but I am not so experienced in scripting (or scripting for multiplayer for that matter ;) )

if you would like to see the mission and have a look at the script you can download it through the link.
http://www.geocities.com/rdxgames/rdxgunship.zip

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Making a other client see text
« Reply #1 on: 10 Jan 2005, 23:49:42 »
Strings can't be send with publicvariable. You'll have to build it in another way. Publicvariable a boolean instead to continue the client script and build the hint string there.  :)
Not all is lost.

RDX

  • Guest
Re:Making a other client see text
« Reply #2 on: 10 Jan 2005, 23:57:25 »
Thanks, that would explain some logical errors I have been getting ::)