プレイ日記
*J.P.*[P]£ aj2003aj
i think 30 trees a day is good enough, also no, there not all 200 thats just the amount until i change it to the right values. so then i just add a lot of code allowing me to cut the trees down, then add a lot more code allowing the trees to respawn, but instead of respawning they grow back, from sapling to bush to small tree to tree. but coding this will take time, a lot of time.. anyways!
2そうだね
プレイ済み
返信[1]
親投稿
Hanzo rzsense
Why don't you use arrays?
2そうだね
未プレイ
返信[2]
親投稿
V360 TheV360
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
1そうだね
プレイ済み
返信[3]
親投稿
*J.P.*[P]£ aj2003aj
i haven't learned about arrays yet, and earlyer when i tried making a for loop it would cause the trees to jump locations everywhere on the screen. but thanks, ill try that.
0そうだね
プレイ済み
返信[4]
親投稿
*J.P.* DEV NEWPICY3
wait so when putting it in spofs would i do SPOFS 7,TREES,TREES cause when i do this i get type mismatch.
0そうだね
未プレイ
返信[5]
親投稿
Hylian Yveltal2001
Array's are basically lists. They store one type of variable, such as ints or strings. You create an array by doing ARRAYNAME = [TOTALITEMS] and you access items from it doing ARRAYNAME[NUMBER]. It always starts at 0 and goes to the total item amount - 1. like ARRAY = [9] then it would go from ARRAY[0] to ARRAY[8]. It's like this in literally every programming language.
0そうだね
プレイ済み
返信[6]
親投稿
Hylian Yveltal2001
And I mistakenly did this before I learned about arrays, but now I can take something that would've cost me 10000 variables and 100000 lines of code, and condense it to one array with less than 5 lines of code.
0そうだね
プレイ済み
返信[7]
親投稿
*J.P.*[P]£ aj2003aj
ok I think I am starting to understand them now a bit more..
0そうだね
プレイ済み
返信[8]
親投稿
V360 TheV360
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
0そうだね
プレイ済み