well yeah..
it does if theres like 500 grass and i create this 10 small rocks i get this drop for some moments and then it gets back to 60. =/
I am in need of one more help from you, to make it like
200 entities and 1 function running, i should not put any while in their initial function.
So far I have made this:
Code:
var grass_array_x[1000];
var grass_array_y[1000];
var grass_array_index;
function define_grass_pos()
{
while(grass_array_index < 1000)
{
grass_array_x[grass_array_index] = random(10000);
grass_array_y[grass_array_index] = random(10000);
grass_array_index += 1;
}
}
So I have defined 1000 positions (x,y) inside my level in a random area of 10,000.
Now I need to create 200 grasses and move them into 200 player nearest positions of this 1000 total positions.
So how am I going to move the grasses between this positions if i cant have a while loop inside their functions? because otherwise it will make 200 running functions.
I was trying to find an Entity Array so i could directly move them. but it doesnt seems to have Entity Arrays only Var and string arrays.
So am i really going to define 200 ENTITIES MANUALLY?
eg.
entity* grass1;
entity* grass2;
...
?
ps. the reason I pre-defined 1000 postitions randomly only once is because once you loaded the game, and the positions are defined, even if you walk out from an area and the grass is removed from there to fill another position, i wanted to when you go back to that place, the grass is put back in the same place, instead of you walk in the same area 10 times and see the grass in 10 different places everytime you walk in that area. ( it may be stupid, maybe the player wont notice it but i wanted it this way unless i really need to change it)