Getting a value from an array is jist like setting them.
FOR I%=0 TO 29 'The %s aren't necessary, just making sure that they are integers
SPSET 7+I%,(whatever the tree sprite is)
SPOFS 7+I%,TREES%[I%,0],TREES%[I%,1]
NEXT
Instead of TREE01, TREE02, do this:
VAR TREES%[30,2] 'integer type, 30 trees by 2 variables
FOR I%=0 TO 29
TREES%[I%,0]=RND(200) 'X
TREES%[I%,1]=RND(200) 'Y
NEXT
If you press the 4th function key, (the one that says "LIST ERR") it will take you to the editor and put your cursor on the line that made the error. Also, most BASIC games won't work at first because of differences between BASIC and SmileBASIC.
RGRPG2 devlog: I finished up the second map and inventory system! Also, debug mode now shows events on the screen! Still need help with the HIT() function.
Same as DIM, it makes arrays, or, if you are in STRICT mode, defines variables. VAR can also be used as a function to get a variable's value from its name.
On SBS, I made a guide for SPANIM.
=====
REPEAT UNTIL's syntax is like this:
REPEAT
VSYNC
UNTIL BUTTON(2)==2
=====
Finally, arrays are like a bunch of variables defined at once.
VAR ARR$[2]
ARR$[0]="Hello "
ARR$[1]="world!"
PRINT ARR$[0]+ARR$[1]
RGRPG2 devlog: added some stuff and cleaned up the code. Unfortunately, not much has changed in the past week, as real life happened. RGRPG2 will be released late May and will have an even bigger world this time, and more ARG-like puzzles! The only thing I'm having trouble with is the battle system. I can probably program everything else well, but I need a function for calculating damage.Thank you