How to use ">" when creating maps. Help please
Root / Programming Questions / [.]
Tiger2Created:
So I am able to set up a bg map with data as opposed to sc saving which I don't care much for. But it only seems to read numbers. I can do it like this:
DATA " 111 " DATA " 121 " DATA " 121 " DATA " "But how do I get the code to read any symbol such as >?
DATA " 111 " DATA " 121> " DATA " 121@ " DATA " "The character code for > is 62 but I don't know how to get the code to read it in the data so it turns it into any bgtile I want Like this?
M=64 DIM MAP[M] FOR I=0 TO M-1 READ MAP[I] NEXT DA=0 D=VAL(A$[I]) BGPUT 1,I,DA,MAP[D] NEXT INC DA WEND DATA "111 " DATA "121> " DATA "111@ " DATA ""
Donโt you just want to use numbers?
I thought of that, but I don't know how to use it for this purpose.VAL(A$[I])You're trying to convert the text character into a numerical value ( VAL() ) here, so yeah, your system currently only works with numbers If you wanted the character code of the characters in your data, try ASC()
IF VAL(A$[I])==62 THEN 'choose your tilejust have a check for if there is a certain symbol
That should be ASCI thought of that, but I don't know how to use it for this purpose.VAL(A$[I])You're trying to convert the text character into a numerical value ( VAL() ) here, so yeah, your system currently only works with numbers If you wanted the character code of the characters in your data, try ASC()IF VAL(A$[I])==62 THEN 'choose your tilejust have a check for if there is a certain symbol
Thanks for your help. I happened to figure it out while I was offline. But now I have another question. Using the data the way did above, how can the maps be as long as I want? The bgscreen only goes so far.That should be ASCI thought of that, but I don't know how to use it for this purpose.VAL(A$[I])You're trying to convert the text character into a numerical value ( VAL() ) here, so yeah, your system currently only works with numbers If you wanted the character code of the characters in your data, try ASC()IF VAL(A$[I])==62 THEN 'choose your tilejust have a check for if there is a certain symbol