OK, another 2 pretty basic problems concerning the label:
1) How do I 'fill' the inside of a font with a colour (like LucasArts text)? I can set the colour of the font itself, but I can't see any command for setting the inside colour. If this isn't possible then how is the LucasArts style text done for the player?
2) For the hovering label I use this in the 'repeatedly_execute':
SetGUIPosition(LABEL, mouse.x+5, mouse.y-10);
It works great, but the problem is that when the label drawing co-ordinated exceed the screen width or height the game crashes. Because the label co-ordinates are drawn slightly away from the cursor this can happen when the cursor nears the edge of the screen.
I've tried using 'while' loops to only display the text when the mouse isn't near the edge of the screen:
function repeatedly_execute() {
//put anything you want to happen every game cycle here
while (mouse.x <= 235) {
while (mouse.y >= 10) {
SetGUIPosition(LABEL, mouse.x+5, mouse.y-10);
}
}
}
This however makes the game crash upon loading with this message:
(...)
(ACI version 2.60.698)
Error: run_text_script1: error -6 (Error (line 15): Script appears to be hung (150001 while loop iterations without an update)) running function 'repeatedly_execute'
Using positive numbers for the label position in accordance to the mouse position doesn't work, and neither does:
SetMousePosition(160, 120);
I can't think what else to do with these problems. Sorry if some of the information is totally useless, I just want to make sure that people reading this know what I've already tried so that they don't post with an unhelpful solution.
Again, thanks in advance
1) How do I 'fill' the inside of a font with a colour (like LucasArts text)? I can set the colour of the font itself, but I can't see any command for setting the inside colour. If this isn't possible then how is the LucasArts style text done for the player?
2) For the hovering label I use this in the 'repeatedly_execute':
SetGUIPosition(LABEL, mouse.x+5, mouse.y-10);
It works great, but the problem is that when the label drawing co-ordinated exceed the screen width or height the game crashes. Because the label co-ordinates are drawn slightly away from the cursor this can happen when the cursor nears the edge of the screen.
I've tried using 'while' loops to only display the text when the mouse isn't near the edge of the screen:
function repeatedly_execute() {
//put anything you want to happen every game cycle here
while (mouse.x <= 235) {
while (mouse.y >= 10) {
SetGUIPosition(LABEL, mouse.x+5, mouse.y-10);
}
}
}
This however makes the game crash upon loading with this message:
(...)
(ACI version 2.60.698)
Error: run_text_script1: error -6 (Error (line 15): Script appears to be hung (150001 while loop iterations without an update)) running function 'repeatedly_execute'
Using positive numbers for the label position in accordance to the mouse position doesn't work, and neither does:
SetMousePosition(160, 120);
I can't think what else to do with these problems. Sorry if some of the information is totally useless, I just want to make sure that people reading this know what I've already tried so that they don't post with an unhelpful solution.
Again, thanks in advance