Okay, so I've been working on a cart as of late, and it's been really fun! However, I've hit a roadblock and I'm not sure how to overcome it, could I have some help?
So the game I'm making is a little factory game, and I'm currently trying to get conveyor belts working, specifically getting objects to stop when they run into each other.
I have two tables for co-ordinates; one for x-values of objects, and one for y-values. There are some subtables for certain objects, but that's not important.
Basically, my collision function checks those tables, sees if there's anything in the way, and if there isn't, it moves the object forward. However, whenever it checks the tables, it checks the entire X table, and then the entire Y table. So if there's an object that's in the obstruction area in the Y table and a separate object in the X table, the code thinks there's something in the way, and it stops the object.
So the million-dollar question is: Is there a way to have for functions stepped through one at a time, so as to keep the X and Y co-ordinates in sync? Or is there a better way? Let me know if ya'll need clarification or code examples.



