hridaysabz 14 Posted December 8, 2013 Hey guys I was wondering why my hint doesn't execute? Everything on that trigger activates except this hint. I'm on a multiplayer server and i'm a complete noob at scripting so if anyone would care to help it would be greatly appreciated! Share this post Link to post Share on other sites
Johnson11B2P 3 Posted December 8, 2013 Please show the script and describe the trigger activation. Share this post Link to post Share on other sites
hridaysabz 14 Posted December 8, 2013 On Act: hint parseText "<t color='#00a693'>We have located a mortar position around your position. It has been marked on the map.</t> <img image='mortar.png'/><br/> <t color='#da9100'>Destroy it before they rain hell on you. Beware, they will be defended heavily."; Condition: Opfor, Not present, Once Share this post Link to post Share on other sites
Johnson11B2P 3 Posted December 8, 2013 (edited) Try changing your image to a .paa or jpg and see if that works. /*Update*\ Try it this way. _textOne = "<t color='#00a693'>We have located a mortar position around your position. It has been marked on the map.</t>" ; _textTwo = "<img image='mortar.jpg'/>"; _textThree = "<br/> <t color='#da9100'>Destroy it before they rain hell on you. Beware, they will be defended heavily.</t>"; hint parseText (_textOne + _textTwo + _textThree); Also you didn't close out your last text. Edited December 8, 2013 by Johnson11B2P update Share this post Link to post Share on other sites
hridaysabz 14 Posted December 8, 2013 Where would this code go? Oops, sorry, I forgot to close the last text. Share this post Link to post Share on other sites
Johnson11B2P 3 Posted December 8, 2013 Well first change the file type of the image to a .jpg or and .paa. Then close that last text. If that doesn't work you could try it this way. Just remove the underscore from the variable names. Share this post Link to post Share on other sites
HazJ 1288 Posted December 8, 2013 I had a similar problem like this where the hint did not show on a dedicated server... This may help you. Good luck! Dirty Haz Share this post Link to post Share on other sites
Johnson11B2P 3 Posted December 8, 2013 If he needs to spawn the hint globally then put all the code here [[{"Your Code"}],"BIS_fnc_Spawn",true] call BIS_fnc_MP; Share this post Link to post Share on other sites
Tankbuster 1733 Posted December 8, 2013 If he needs to spawn the hint globally then put all the code here[[{"Your Code"}],"BIS_fnc_Spawn",true] call BIS_fnc_MP; When a trigger is activated it's onAct field is executed on all clients and server. There's no need to use fnc_mp. Not only that, sending code this way is bad practice. Share this post Link to post Share on other sites
Johnson11B2P 3 Posted December 8, 2013 If it isn't getting passed globally then I don't see why that isn't a valid option. Share this post Link to post Share on other sites
iceman77 18 Posted December 8, 2013 (edited) Triggers are created / executed locally. But, what he's saying is that in most cases, the condition will return true for all clients, at the same time in any case, thus hinting to everyone. Appearing to have a global effect.. Such as the OP's condition "opfor not present" - will return true for all clients triggers at once. Thus firing all of them at the same time. So all's you should need in that trigger is a simple hint "message". Also, the "bad practice" he was talking about... I think he was referring to the code space. IE;Writing your whole code in the code space, rather than calling a function from there that contains said code. I could be waaaaaay wrong though. :p Edited December 8, 2013 by Iceman77 Share this post Link to post Share on other sites
hridaysabz 14 Posted December 8, 2013 Hey guys, I'm firing it from a trigger using EXECVM(Script) but it doesn't show up. Ideas? Share this post Link to post Share on other sites
iceman77 18 Posted December 8, 2013 (edited) Please post your exact trigger and your exact script. That way, we (together as a loving community) can make some head way on your problem. Also, please use code tags or php tags to post the code. :) Edited December 8, 2013 by Iceman77 Share this post Link to post Share on other sites
hridaysabz 14 Posted December 9, 2013 Trigger Parameters: Opfor Not Present Once Activation: _nul = [] execVM "briefing.sqf";' Briefing.sqf: _textOne = "<t color='#00a693'>We have located a mortar position around your position. It has been marked on the map.</t>" ; _textTwo = "Remember the ROE and Hit hard."; _textThree = "<br/> <t color='#da9100'>Destroy it before they rain hell on you. Beware, they will be defended heavily.</t>"; hint parseText (_textOne + _textTwo + _textThree); Share this post Link to post Share on other sites
iceman77 18 Posted December 9, 2013 I tested what you posted and it worked fine. Only thing I can think of, is your condition box. Make sure the condition is this note: assuming the ' after the semicolon is a typo Share this post Link to post Share on other sites
hridaysabz 14 Posted December 9, 2013 ==========Edit============ Works now, I feel so dumb. Huge thanks to everyone here for helping me out! Share this post Link to post Share on other sites
iceman77 18 Posted December 9, 2013 Example Cheers, Iceman77 Share this post Link to post Share on other sites
zgmrvn 95 Posted December 9, 2013 (edited) hint is a client side function, to display your hint on each client you can use BIS_fnc_MP: if !(isServer) exitWith {}; // run this script on server side only ["your message", "BIS_fnc_hint", true] spawn BIS_fnc_MP; Edited December 9, 2013 by Zigomarvin Share this post Link to post Share on other sites
iceman77 18 Posted December 9, 2013 (edited) hint is a client side function, to display your hint on each client you can use BIS_fnc_MP: He doesn't need to use bis_fnc_mp, as he's using a trigger. Triggers are created and executed locally for each client and since most times (like his opfor no present trigger) the condition will return true for each client at the same time in any case, thus hinting for each client (giving the illusion of a global effect). No broadcasting is needed here. Only a simple hint "message"; Edited December 9, 2013 by Iceman77 Share this post Link to post Share on other sites