afsf06 31 Posted August 14, 2016 Hello, I'm working on a mission, and I'd like during the "briefing" portion to display text in the center of the screen in a similar form as cutText command, however I want to display new lines as the previous ones fades out, if that makes sense? Example: Display in the center of screen: This is my first line of text, yay. (fades) new line displays in center of screen: This is my second line of text, yay. (fades) new line displays, etc, etc. Is this possible? I had something similar to: _layer1 = "normal" cutText ["Briefing Text","PLAIN", 2]; player globalChat "Briefing Text"; sleep 5; _layer2 = "normal" cutText ["Briefing Text 2","PLAIN", 2]; player globalChat "Briefing Text 2"; sleep 5; _layer3 = "normal" cutText ["Briefing Text 3","PLAIN", 2]; player globalChat "Briefing Text 3"; sleep 5; etc, etc....in the activation of a trigger at the beginning of the mission, but using this will just display everything at once, and it wont "sleep" to give it time to fade out, and start the new line. Should I put this in a .sqf and then run that sqf from the trigger? Should I be using uisleep instead? Or is there a better workaround that you're aware of? Thanks in advance for any help.... Share this post Link to post Share on other sites
afsf06 31 Posted August 15, 2016 Tried changing the sleep time to something more substantial using the same above code, but changing sleep to sleep400; doing that now only displays only the last line...I'm sure I'm using cutText not as intended, but this is frustrating, haha Share this post Link to post Share on other sites
jstibbsy 54 Posted August 15, 2016 It works fine for me, maybe put it in a 'inform.sqf'. Then call it from there, it seems arma won't read sleeps in triggers. Otherwise try this: sleep 5; _layer1 = "normal" cutText ["Briefing Text","PLAIN", 2]; player globalChat "Briefing Text"; sleep 5; _layer2 = "normal" cutText ["Briefing Text 2","PLAIN", 2]; player globalChat "Briefing Text 2"; sleep 5; _layer3 = "normal" cutText ["Briefing Text 3","PLAIN", 2]; player globalChat "Briefing Text 3"; sleep 5; Share this post Link to post Share on other sites
afsf06 31 Posted August 18, 2016 In case any one was interested, I figured out what the problem was - the "sleep" code....I had to use it this way: [] spawn {sleep 5; cutText ["Briefing Text 1.","PLAIN",1]; player globalchat "Briefing text 1.";}; [] spawn {sleep 10; cutText ["Briefing Text 2","PLAIN",1]; player globalchat "Briefing text 2";}; [] spawn {sleep 15; cutText ["Briefing Text 2","PLAIN",1]; player globalchat "Briefing text 3";}; If you'll notice, I had to increase the sleep timer in increments (I did 5 seconds, as that is what I needed/wanted for sufficient time to read the text). And this way it works perfectly, and as I intended in my original post. In the old code if you kept the sleep timer to 5 for all of them, they will sleep for 5 and then activate all at the same time, it won't run one line, and then the next (against logic). I stumbled on this accidentally, but hopefully it will help anyone who is struggling with sleep timers on other code. Cheers. Share this post Link to post Share on other sites
KevsNoTrev 44 Posted August 18, 2016 you could have just spawned the whole script as above.... [] spawn { _layer1 = "normal" cutText ["Briefing Text","PLAIN", 2]; player globalChat "Briefing Text"; sleep 5; _layer2 = "normal" cutText ["Briefing Text 2","PLAIN", 2]; player globalChat "Briefing Text 2"; sleep 5; _layer3 = "normal" cutText ["Briefing Text 3","PLAIN", 2]; player globalChat "Briefing Text 3"; sleep 5; }; Share this post Link to post Share on other sites