I've got a blue block and a yellow block in a room. I want to be able to push the blue block on top of the yellow one (or vice versa) to create a green block.
Couple of problems, though. First of all, if two events occupy the same space, the game freezes. I don't need the two events to actually exist in the same space. I'm thinking of something like removing one or both events (the blue and yellow blocks) and replacing them with a third (the green block). Unfortunately, I don't know how to make that happen.
Is there a way to make the events recognize when another event is nearby? For example, set a condition so that if the blue block is to the right of the yellow block, and the yellow block is pushed from the left, something happens (before the events overlap and the game freezes)?
Basically, something like this:
If Blue is to the right of Yellow, and Yellow is pushed to the right, remove Blue and replace Yellow with Green.
Any ideas would be appreciated.
Couple of problems, though. First of all, if two events occupy the same space, the game freezes. I don't need the two events to actually exist in the same space. I'm thinking of something like removing one or both events (the blue and yellow blocks) and replacing them with a third (the green block). Unfortunately, I don't know how to make that happen.
Is there a way to make the events recognize when another event is nearby? For example, set a condition so that if the blue block is to the right of the yellow block, and the yellow block is pushed from the left, something happens (before the events overlap and the game freezes)?
Basically, something like this:
If Blue is to the right of Yellow, and Yellow is pushed to the right, remove Blue and replace Yellow with Green.
Any ideas would be appreciated.