OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Chomps on 20 Aug 2003, 00:57:42
-
Okay, I have two seperate situations concerning hints, but there may be a common solution to both.
I have quite a few triggers around the map, their conditions are all EAST DETECTED BY CIVILIANS and are on REPEATEDLY. The only command the trigger executes is a hint message. Problem is, in multiplayer, some players will get the hint messages, others won't, with no consistancy in who gets it and who doesn't. They are all in-game triggers so I thought they were supposed to be global.
Also, and this is completely separate, I have an action that a player can perform at a certain place that activates a script. In the script it is just another hint message, but again, this does not appear for all the players. I realize that scripts have to have variables manually broadcasted with publicVariable, but how would you do that with a hint message? Also, the action is run from a Game Logic unit, if that makes a difference.
-
Does it have anything to do with my number of triggers? I have maybe between ten and twenty of those kinds of triggers.
-
one possibility is to have a bolean transmitted as a public variable
lets call the boolean ACTIVATED
have the trigger or whatever transmit
activated = true
or a script run serverside only have the lines
activated = true; publicvariable "activated"
and on each clients screen have a script waiting for the boolean to become true, then run the script using the line
@ activated
?!(local player):exit
hint format [" blah blah blah"]
this will certainly make sure all clients run the script
as for running an action on a game logic, not sure about this. A game logic is only local to the server
-
Thanks, I think I am getting the hang of this local/global variable dealy.
Where should I call the @activated script, in the init.sqs?
-
yes the init would be fine, or if you dont want the script running from the start, use something else to start it up closer to the time it is required