Hey Guys,
how can i create Random objects that not overlapping another?
i would make that 5 obj_Tower are creating but not overlapping a other obj_Tower
Here is what i have...
I dont know how can i make this =(
You need to mark the used spawners somehow. For example, add an instance variable isUsed:
For "n" from 1 to 5 Spawner isUsed=false Pick random Spawner -> Spawner set isUsed=true -> Spawner spawn Tower
You can even use some existing property for this, for example set used spawners invisible, or disable their collision.
Develop games in your browser. Powerful, performant & highly capable.
it works fine! Thanks =)