How do I create a level editor?

Get help using Construct 2

Post » Mon Jul 10, 2017 4:33 am

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
B
10
S
1
Posts: 12
Reputation: 474

Post » Mon Jul 10, 2017 8:46 am

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.
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Mon Jul 10, 2017 8:07 pm

plinkie wrote: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?
B
10
S
1
Posts: 12
Reputation: 474

Post » Mon Jul 10, 2017 8:27 pm

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.
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests