トピック
*J.P.* DEV NEWPICY3

New Island Wars 2 discussion, help really needed, from anyone.

Quick recap. IW2 is basically a survival game with many cool stuff. now i need help but first i have an idea. trees, they are the main starter of the game. so they are also annoyingly hard to use so here are they're needed features! tbc IC
2そうだね
プレイ済み
返信[1]
親投稿
*J.P.* DEV NEWPICY3
so first off there are different axes available to use to cut them down different ones cut faster/slower. anyways so i want a mini hpbar for every tree, that only show when the player is near enough to it or hitting it. simple to make later. i want types of trees like apple, or pine idk. i want a feature to shake trees to get apples or stuff. ill continue later, i gotta eat lol so tbc.
1そうだね
プレイ済み
返信[2]
親投稿
*J.P.* DEV NEWPICY3
this all is easy but there is one problem I have faced with it. that is making all the trees, I need something to randomly place them whilst not continuously moving them but still moving them - the x/y of the main player. problem- I can randomly place them but when put in a loop they move everywhere cause they are always changing position. or I don't put it in the loop and it just sticks to the
1そうだね
プレイ済み
返信[3]
親投稿
*J.P.* DEV NEWPICY3
screen.. so either way its annoying. now I could just put a set and spofs for every one but there are a lot of trees so lol not happening. anyways I really need help with this so please help me.
1そうだね
プレイ済み
返信[4]
親投稿
alonso periquitosxl
Arrays are the best way. If you trees are sprites, sprite variables "spvar" can help you.
1そうだね
プレイ済み
返信[5]
親投稿
PChicken NerdChicken
I have a feeling you're randomizing the position of every tree in your main loop FORs. Try making an array at the beginning and a FOR loop to go with it before the main loop. This initialization FOR loop should randomize the position of all the trees so that you can just take the array element and render a tree from there in the main loop.
1そうだね
プレイ済み
返信[6]
親投稿
*J.P.* DEV NEWPICY3
hmm thats actually fairly understandable to me.. ill see what comes of that.. thanks
1そうだね
プレイ済み