I basically want to have a dialog box at the beginning of the game for the user with about three selections, normal terrain, rocky terrain, hardcore terrain. For the rocky terrain I want to have random rocks or objects generate on their building lane, and the same for hardcore just more intense. So I was wondering if anyone knew of a way that I would be able to generate random rocks on a certain area of my terrain if the user selects it
That should do what you want, balance the variable X for each difficulty setting and you are done :) It's totally random though, so it's not guaranteed the placement would be well done.
Another solution could be to place the rocks at predefined points, but that's up to you!
That should do what you want, balance the variable X for each difficulty setting and you are done :) It's totally random though, so it's not guaranteed the placement would be well done.
Another solution could be to place the rocks at predefined points, but that's up to you!
No you didn put x in the create action, once a random point is chosen, all x units will be created at the exact same point, not producing the randomness you want. Just loop create action of 1 unit x times, that way x rock will be spawned at random location.
I basically want to have a dialog box at the beginning of the game for the user with about three selections, normal terrain, rocky terrain, hardcore terrain. For the rocky terrain I want to have random rocks or objects generate on their building lane, and the same for hardcore just more intense. So I was wondering if anyone knew of a way that I would be able to generate random rocks on a certain area of my terrain if the user selects it
I am fairly sure this can be done, as I've seen a 'diablo-styled' map featured here that generated random 'dungeons', using blocks for walls.
How you do it?
I have absolutely not a clue.
@Jrad3412: Go
That should do what you want, balance the variable X for each difficulty setting and you are done :) It's totally random though, so it's not guaranteed the placement would be well done.
Another solution could be to place the rocks at predefined points, but that's up to you!
@Moooyaah: Go
No you didn put x in the create action, once a random point is chosen, all x units will be created at the exact same point, not producing the randomness you want. Just loop create action of 1 unit x times, that way x rock will be spawned at random location.
@progammer: Go
you're right, my bad for not actually testing it on a map :)