1
Ask a Question / Re: How do I randomly place actors on a grid without them colliding?
« on: November 10, 2024, 12:28:37 pm »Code: [Select]
Set row count to 0
For each item in columns (this is the primary list, items becomes your rows list).
-set blue count to 0
-set red count to 0
--for each item in item (the first item block now contains individual cells).
---if item = 1, increment blue count
---if item = 2, increment blue count
-if blue count >= 6, call an event to clear the column, setting the cell values to 0.
-increment row count
Rough pseudocode, checking for full rows. If you can implement that, you'll be able to expand it to check for columns as well.