プレイ日記
*J.P.*[P]£ aj2003aj
trees generation still not working, asking anyone (especially raimondz) if i should just go the long way and use the long setup method (repeating instead of for loop) as it just wont work! it will either 1: fiz all over the map, though fixed with while loop, then when fixed 2: stays stuck to screen! (so mad) (yes using 3ds battery that i wont gain back) fast response is always helpful!
2そうだね
プレイ済み
返信[1]
親投稿
Guy brilliance360
Seeing what you have coded/knowing all of what you need from the trees would help with getting an answer.
0そうだね
プレイ済み
返信[2]
親投稿
*J.P.*[P]£ aj2003aj
ok i will try to share everything here, so 1st, my game uses sprites as the map meaning i do a simple SPOFS (player),SPX-X,SPY-Y for everything, this dosent work however with my trees for unknown reasons and only works when fizzing around the map, it does this because its in a loop and keeps changing the location every loop, ill show code- brb
0そうだね
プレイ済み
返信[3]
親投稿
*J.P.*[P]£ aj2003aj
↑the for loop code↑, ill show the non for loop code now which DOES WORK VERY WELL, i was just told it was incorrect to do it that way. brb again
0そうだね
プレイ済み
返信[4]
親投稿
*J.P.*[P]£ aj2003aj
like this↑↑ (though for loop is at the top of the code usually) i am fine with doing it this way but if there is an easyer way i will do it. anyways.
0そうだね
プレイ済み
返信[5]
親投稿
raimondz raimondzz
Well, I haven't seen your new code yet but you need to iterate the tree array on each loop and call spofs for each of them. Since I see spset on the first pic, I assume that the code you posted is part of the initialization of your game.
0そうだね
プレイ済み
返信[6]
親投稿
raimondz raimondzz
Another way to handle camera movement is to set an sprite that will serve as the camera and link all the entities to it with splink (Except the player since he's always on the middle of the screen.) The you just need to move the camera sprite to move everything else. Note that you need to ensure that the management number of each sprite is greater than the one used by the camera.
0そうだね
プレイ済み
返信[7]
親投稿
Guy brilliance360
So like what raimondz said, in the for loop code you have it setting up the trees. Every time that code runs, the program picks new random x,y coordinates and places a sprite there. In the code for while you are playing the game, all you want in your for loop is the spofs.
0そうだね
プレイ済み
返信[8]
親投稿
*J.P.*[P]£ aj2003aj
well i might just do the long way because i will need to do a lot of separate spcol stuff, thanks guys.
0そうだね
プレイ済み