Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

How to check if there's a string displayed on the screen?

3 replies · 1,118 views · Started 03 March 2009

Everything's in the title. How can I know if there is a string displayed on the screen? I've tried that one:

if(Screen->Message(3))
//if message #3 is displayed, then do that code

But it doesn't seem to be a boolean... How can I do it?

Screen->Message() displays a message. If there's already a message, it overwrites it.

Are you trying to ensure that Screen->Message() succeeds? (You don't need to, it's guaranteed) Or, do you just want to avoid showing multiple messages? (It won't.)

Perhaps you should investigate the "Messages Freeze All Action" rule, which stops your scripts from running while messages are being drawn (including if the player needs to press A to advance the message)

Edit: To answer the question directly, you can't check to see if there's a string on the screen.

Actually, you can!
If you use a string control code to give Link a dummy item at the beginning of your message and another one to remove it at the end, your script can check whether Link has the item - thus letting you know whether there's a message displayed.

'Messages Freeze All Action' is much better though.