Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Color mixing events

Aevin

Member

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.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top