driftingnitro 38 Posted May 6, 2015 I've been trying to make a trigger activated hint that has flashing text by using parseText, but it hasn't been working in my favor. The trigger is activating perfectly fine which I tested by making it display a normal hint in the "on Act." a few times just to make sure. Here is the code in the "on Act." I've been trying to use to activate the sqf file itself. _handle = execVM "mu_trgt.sqf"; I've even temporarily changed the the file with just hint "activated"; and it worked. I have deducted that there is some problem with the following code in the mu_trgt.sqf: _titlered = "<t color='#cc0000' size='1.2' shadow='1' shadowColor='#ffcc00' align='center'>Mission Update:\n\n</t>"; _titleylw = "<t color='#ffcc00' size='1.2' shadow='1' shadowColor='#cc0000' align='center'>Mission Update:\n\n</t>"; _text=<t align='center'>All primary targets destroyed</t>"; hint parseText (_titlered + _text); sleep 0.5; hint parseText (_titleylw + _text); sleep 0.5; hint parseText (_titlered + _text); sleep 0.5; hint parseText (_titleylw + _text); sleep 0.5; hint parseText (_titlered + _text); sleep 0.5; hint parseText (_titleylw + _text); sleep 0.5; hint parseText (_titlered + _text); sleep 0.5; hint parseText (_titleylw + _text); Share this post Link to post Share on other sites
jshock 513 Posted May 6, 2015 Well, you have said what has worked, but what specifically isn't working as intended? Share this post Link to post Share on other sites
driftingnitro 38 Posted May 6, 2015 Well, you have said what has worked, but what specifically isn't working as intended? It does not display any hints when running the file. Share this post Link to post Share on other sites
jshock 513 Posted May 6, 2015 Try this: _titlered = parseText "<t color='#cc0000' size='1.2' shadow='1' shadowColor='#ffcc00' align='center'>Mission Update:\n\n</t>"; _titleylw = parseText "<t color='#ffcc00' size='1.2' shadow='1' shadowColor='#cc0000' align='center'>Mission Update:\n\n</t>"; _text= parseText <t align='center'>All primary targets destroyed</t>"; hint composeText [_titlered + _text]; Share this post Link to post Share on other sites
driftingnitro 38 Posted May 6, 2015 no luck, again the trigger activated but nothing displays for the player. Share this post Link to post Share on other sites
jshock 513 Posted May 6, 2015 Ok, try changing the hint line to: [composeText [_titlered + _text],"hint",true,false,false] call BIS_fnc_MP; Share this post Link to post Share on other sites
driftingnitro 38 Posted May 6, 2015 It didn't work again but I did some more debugging and it seems to stop the file at this line: _text= parseText <t align='center'>All primary targets destroyed</t>"; this is the last line before it activates the hint itself, so the code to the display hint is probably fine. Share this post Link to post Share on other sites
austin_medic 109 Posted May 6, 2015 It didn't work again but I did some more debugging and it seems to stop the file at this line: _text= parseText <t align='center'>All primary targets destroyed</t>"; this is the last line before it activates the hint itself, so the code to the display hint is probably fine. Well for starters theres a quote missing if you look close _text= parseText <t align='center'>All primary targets destroyed</t>[b]"[/b]; Share this post Link to post Share on other sites
driftingnitro 38 Posted May 6, 2015 There's the bugger, now I just need to find out why it's not displaying. I've tried all three methods again, hint composeText, hint parseText, and BIS_fnc_MP exactly how they were posted here. ---------- Post added at 23:36 ---------- Previous post was at 23:19 ---------- I've tested all three versions and will paste the errors that occured when trying to display hint "Error +: Type text, expected Number, Array, String, Not a number" This seems to appear on every version, making me think there might be something else wrong with the text? Share this post Link to post Share on other sites
austin_medic 109 Posted May 6, 2015 There's the bugger, now I just need to find out why it's not displaying. I've tried all three methods again, hint composeText, hint parseText, and BIS_fnc_MP exactly how they were posted here.---------- Post added at 23:36 ---------- Previous post was at 23:19 ---------- I've tested all three versions and will paste the errors that occured when trying to display hint "Error +: Type text, expected Number, Array, String, Not a number" This seems to appear on every version, making me think there might be something else wrong with the text? It doesn't want you to do binary addition on the text, good question is how can you circumvent that... Off the top of my head you could use the format command to merge the two seperate texts into one string then simply display that, eliminating binary addition all together Share this post Link to post Share on other sites
driftingnitro 38 Posted May 7, 2015 Bah, I'll have to revive this thread next time I REALLY need this. I'm just gunna use an old fashioned objective function for this task. Share this post Link to post Share on other sites
Greenfist 1863 Posted May 7, 2015 (edited) The version in the first post is working just fine, when you change the line breaks to <br/> instead of \n. And add the missing quote _text="<t align='center'>All primary targets destroyed</t>"; You can't combine structured texts with + , so first add strings together and use parsetext last. But you can combine already parsetexted text with combosetext [_titlered,_text]; Edited May 7, 2015 by Greenfist Share this post Link to post Share on other sites
dreadedentity 278 Posted May 7, 2015 you can combine already parsetexted text with combosetext I've never heard of combosetext but there is composeText that has the same function you described. I just assumed you made a typo. ---------- Post added at 04:12 ---------- Previous post was at 04:01 ---------- I've simplified your script, fixed the errors, and confirmed it's working: _titlered = parseText "<t color='#cc0000' size='1.2' shadow='1' shadowColor='#ffcc00' align='center'>Mission Update:</t>"; _titleylw = parseText "<t color='#ffcc00' size='1.2' shadow='1' shadowColor='#cc0000' align='center'>Mission Update:</t>"; _text = parseText "<t align='center'>All primary targets destroyed</t>"; //opportunity to play a nice sound here for "_i" from 0 to 5 do { if (_i % 2 == 0) then { hint composeText [_titlered, linebreak, linebreak, _text]; } else { hint composeText [_titleylw, linebreak, linebreak, _text]; }; sleep 0.5; }; Structured text didn't seem to care about your \n\n so I removed them and added a double linebreak using the composeText command. I think only a single linebreak looks much better, but it's your script in the end. Share this post Link to post Share on other sites
Greenfist 1863 Posted May 7, 2015 I've never heard of combosetext but there is composeText that has the same function you described. I just assumed you made a typo. Yeah, a typo. Sorry about the confusion. But it was 7AM and I was just beginning to wake myself up with a pot of coffee and some debugging. //opportunity to play a nice sound here Doesn't 'hint' already play a sound? 6 of them with your code? Share this post Link to post Share on other sites
dreadedentity 278 Posted May 7, 2015 Doesn't 'hint' already play a sound? 6 of them with your code? The sound that hint plays is tied to some sound setting in-game. I don't remember which slider it was, but through my tweaking to find the optimal sound volume for me, the sound has now completely disappeared. Also, if it's a problem, I welcome you to use the hintSilent command. Share this post Link to post Share on other sites
Greenfist 1863 Posted May 7, 2015 The sound that hint plays is tied to some sound setting in-game. I don't remember which slider it was, but through my tweaking to find the optimal sound volume for me, the sound has now completely disappeared. Also, if it's a problem, I welcome you to use the hintSilent command. It's the "Music" slider, by the way. I think it's safe to assume that most players haven't muted the music and will hear the annoying hint bleebing. So hintSilent (and maybe playsound "Hint" or "taskSucceeded") might be better. Share this post Link to post Share on other sites