spawning actors
Tempiero
Member Posts: 24
Hi.
I need spawn 6 actors in random point in the scene, but i don't need it spawn like this
but for example like this
or maybe like this
Comments
If you want to spawn without overlapping, you'll need to track the location of each spawned actor (probably in a table) and not spawn further actors that will overlap with that area. It's a lot more difficult than you might think. An easier route some people take is to spawn the actors invisible, and if they overlap with another, destroy them and spawn another one, and if they don't overlap with another, show them. With actors as big as in your example that probably wouldn't work very well, though.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
You might consider looping through a table of preset values (x and y) that ensure that you won't have overlaps. It's not truly random but if you use enough variance it can appear to be so.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User