2d_warrior
Member
The player needs to pass through a series of objects that are lined up next to each other. The behavior must change based on the last object it collided with, and the current object it has entered.
How I keep the variable last_collide from writing the same value as new_collide once I start to collide with the second object?
Once the player hits a third object last_collide should change to the value of the 2nd object, and new_collide should change to the value of the third. Note that the vars shouldn't change unless there's a new instance collided with, and that the player may collide with 2 objects at once when moving between the objects. The player never collides with 3 or 4 of these objects at once. The collision objects are up against each other but not stacked on top of each other.
How I keep the variable last_collide from writing the same value as new_collide once I start to collide with the second object?
Once the player hits a third object last_collide should change to the value of the 2nd object, and new_collide should change to the value of the third. Note that the vars shouldn't change unless there's a new instance collided with, and that the player may collide with 2 objects at once when moving between the objects. The player never collides with 3 or 4 of these objects at once. The collision objects are up against each other but not stacked on top of each other.