Random spawn point no repeat (dealing with removing and adding rows)
Megaemman
Member, PRO Posts: 72
Hello in my game i have these rules set up for my spawn actor:
https://www.dropbox.com/s/nh9hj6qhhaj4re6/Screenshot 2014-02-04 10.14.11.png
I have different actors spawning every two seconds in eight different locations( eight row with different x,y locations) at random during a 60 second time period. Unfortunately , some of the actors will spawn in the same location.
I wanted to make so the actors don't overlap so i followed the Random spawn point no repeat template :
https://www.dropbox.com/s/gjlzokyn6rci4sa/Screenshot 2014-02-04 10.16.37.png
I was wondering once you remove the rows can you add them back after a short period of time, or would it be easier to add more rows instead?
https://www.dropbox.com/s/nh9hj6qhhaj4re6/Screenshot 2014-02-04 10.14.11.png
I have different actors spawning every two seconds in eight different locations( eight row with different x,y locations) at random during a 60 second time period. Unfortunately , some of the actors will spawn in the same location.
I wanted to make so the actors don't overlap so i followed the Random spawn point no repeat template :
https://www.dropbox.com/s/gjlzokyn6rci4sa/Screenshot 2014-02-04 10.16.37.png
I was wondering once you remove the rows can you add them back after a short period of time, or would it be easier to add more rows instead?
Comments
I don't really understand what you're asking here: Add more after a short time or add more...? What's the difference?
Usually, if you are choosing a random value from a table, you would do so until the table is exhausted (empty). If you need to use those values again, you could copy the table before it gets used and then copy that backup into your active table and start the process again.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
https://www.dropbox.com/s/shjxvxzhzlm88h2/Screenshot 2014-02-04 18.58.07.png
Sort of like a loop hmmm... I'll give it a go!
UPDATE: Tested it out and now the overlaps are near to none, thanks !
Create an integer attribute called game.zero and give it the value 0.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User