HazJ 1289 Posted May 26, 2013 Problem 1: I need help with getting "hint parseText format" to display correctly in multiplayer if possible as its work just fine in the editor. http://xtreme-gaming-clan.co.uk/Dadds%20Army/Private/Hint.jpg _SideObjectiveComplete = ["<t color='#FEF50A' size='1.6' shadow='1' shadowColor='#000000' align='center'>Side Objective Complete</t><br/><br/><t color='#66A600' size='1.6' shadow='1' shadowColor='#000000' align='center'>Well Done!</t><br/><br/><t color='#EEEEEE' size='1.3' shadow='1' shadowColor='#000000' align='center'>You have earned a %1 for successfully completing the Side Objective.</t><br/><br/><t color='#EEEEEE' size='1.3' shadow='1' shadowColor='#000000' align='center'>It can be found at the Main Base.</t><br/><br/>", _disname]; "<t color='#FEF50A' size='1.6' shadow='1' shadowColor='#000000' align='center'>Side Objective Complete</t><br/><br/><t color='#66A600' size='1.6' shadow='1' shadowColor='#000000' align='center'>Well Done!</t><br/><br/><t color='#EEEEEE' size='1.3' shadow='1' shadowColor='#000000' align='center'>You have earned a %1 for successfully completing the Side Objective.</t><br/><br/><t color='#EEEEEE' size='1.3' shadow='1' shadowColor='#000000' align='center'>It can be found at the Main Base.</t><br/><br/>"; GlobalHint = _SideObjectiveComplete; publicVariable "GlobalHint"; hint parseText format _SideObjectiveComplete; Problem 2: This "hint" is not showing at all in multiplayer but does in the editor. _SideObjective1 = "<t color='#FEF50A' size='1.6' shadow='1' shadowColor='#000000' align='center'>New Side Objective</t><br/><br/><t color='#FF0066' size='1.6' shadow='1' shadowColor='#000000' align='center'>Recover</t><br/><br/><t color='#EEEEEE' size='1.3' shadow='1' shadowColor='#000000' align='center'>Intel reports a 'Valuable Item' at the bottom of the sea.</t><br/><br/><t color='#EEEEEE' size='1.3' shadow='1' shadowColor='#000000' align='center'>Find and recover it. Check map for the location.</t><br/><br/>"; GlobalHint = _SideObjective1; publicVariable "GlobalHint"; hint parseText GlobalHint; Dirty Haz Share this post Link to post Share on other sites
LoonyWarrior 10 Posted May 27, 2013 (edited) looks like u didnt get the joke... your code... is completly wrong... u have server and u have clients... and as u know u have to have defined variable on the server and then make it public aka send that to clients.. (thats what your code do) but you re missing the client side.. clients dont know what to do when they get your variable.......... "serverVariable" PublicVariableEventHandler { do something }; ...when serverVariable is published.... do some thing.. if (isServer) then { ObjCompletedFunction = { serverVariable = true; publicVariable "serverVariable"; if (!isDedicated) { call SomeFunction; }; }; }; if (!isServer) then { "serverVariable" addPublicVariableEventHandler { call SomeFunction; }; }; if (!isDedicated) { SomeFunction = { if (!isNil "serverVariable") then { use serverVariable...... bla bla bla.... show hint.... }; }; }; on server.... objective completed......... call ObjCompletedFunction; and u CANT send this whole text to all clients.......... send true, false or number.... think about net traffic.. and localization.......... Edited May 27, 2013 by LoonyWarrior Share this post Link to post Share on other sites
HazJ 1289 Posted May 27, 2013 My code is probably wrong but I have got it working now (just "Problem 2"). Init.sqf: "GlobalHint" addPublicVariableEventHandler { private ["_GHint"]; _GHint = _this select 1; hint parseText format["%1", _GHint]; }; Dirty Haz Share this post Link to post Share on other sites
mikie boy 18 Posted May 27, 2013 hint parseText format _GHint; Share this post Link to post Share on other sites
LoonyWarrior 10 Posted May 27, 2013 (edited) My code is probably wrong but I have got it working now (just "Problem 2").Dirty Haz again... u CANT send this whole text to all clients... "GlobalHint" addPublicVariableEventHandler { hint parseText (_this select 1); }; .....this will do NOTHING on machine which triggered publicVariable ""; ---------- Post added at 19:40 ---------- Previous post was at 19:39 ---------- hint parseText format _GHint; why format ? Edited May 27, 2013 by LoonyWarrior Share this post Link to post Share on other sites
HazJ 1289 Posted May 27, 2013 I have everything working now. again... u CANT send this whole text to all clients... Well maybe so but I have. :) Dirty Haz Share this post Link to post Share on other sites