How do I create a level editor?

  • I don't need to know anything too complicated, I just want to know how to take a menu with the sprites of the objects you can place, and have it so that if you click on a sprite, then click the screen, the sprite will appear where you clicked

  • Click on a sprite in the menu and set a variable to a certain value which relates to that sprite, i.e. if you clicked the grass then set var to 1, if you clicked path then set var to 2. Then on mouse clicked, check that variable and create the object.

  • Click on a sprite in the menu and set a variable to a certain value which relates to that sprite, i.e. if you clicked the grass then set var to 1, if you clicked path then set var to 2. Then on mouse clicked, check that variable and create the object.

    Oh cool, thanks! But just wondering, what if I wanted keep the objects from overlapping?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Since it's a level editor I guess you create it in a grid format, then you could have a detection sprite, a kind of pre-stamp thing like they use in theme park games and real-time strategy. If the pre-stamp object that follows the cursor is overlapping an object already in the level then it can't be placed.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)