|
Post by fadgeplaysgames on Dec 10, 2017 14:45:52 GMT
I want the lives displayed on screen to show (e.g.) 03 instead of 3. How do I do this? OR, maybe there is a more elegant solution? The problem Im having is I used the putblock command to place graphics outside the game area where the score and lives would go, but as I dont know how to just change the paper colour in a specific area, I am left with leaving a blank black space and placing the text in this area. Now, if I have single digit numbers, I need to leave some sort of blank space incase the player gets enough extra lives to go into double digits, but I end up with a blank space like this: Any solutions? As you can probably tell im not very experienced at this.
|
|
|
Post by andrewvanbeck on Dec 11, 2017 12:23:56 GMT
Maybe it would be enough to have a message with just a space in it, or a 0 - then if the lives < 10 you display the message then the score, otherwise display the score...
IF LIVES > 9 DISPLAY LIVES ELSE MESSAGE 10 DISPLAY LIVES ENDIF
|
|
|
Post by fadgeplaysgames on Dec 11, 2017 13:15:01 GMT
alright nice idea, thanks. I will try it.
|
|
|
Post by alessandro on Dec 12, 2017 16:46:51 GMT
That solution is not good because the '0' will be shown on the line below the lives number. You must specify the line and column (and possibly the colour if you plan to display text lines in different colours) before displaying the text message. Futhermore, when you want to specify a condition where a value is lesser than another, AGD script does not accept the '<' condition, only the '<=' one.
This is taken from my personal experience, assuming message 0 is a simple '0' character, or a blank space (in this case it is better to redefine a character, e.g. #, as a blank space in the character set designer, and set the message as simply #):
LET LINE [line number] LET COLUMN [column number] IF LIVES <= 9 MESSAGE 0 LET LINE [line number] LET COLUMN [column number + 1] DISPLAY LIVES ELSE DISPLAY LIVES ENDIF
Hope that helps!
|
|
|
Post by fadgeplaysgames on Dec 16, 2017 0:19:41 GMT
havent tried it yet, but thanks I will give it a go!
|
|
|
Post by Jonathan Cauldwell on Jul 21, 2018 18:35:13 GMT
The latest multi-platform version has options to display numbers as two or three digit numbers with leading zeroes. For example, the number 1 could be displayed as "01" or "001". There's even an option to display a number in the form of a timer. So for example, the line DISPLAY SECONDS 150 would show as "2 30". The space is a skipped character as you'd probably want to display your own choice of full stop, colon or other character.
|
|