I have two question

Get help using Construct 2

Post » Wed Jul 08, 2015 5:26 pm

First question is that is it better to use one sprite that has all the different type of monster in it or to have different sprite for each new type of monster? Especially on a style where there is most likely a dungeon theme with one type of monster with boss at the end.

2nd question: I developed this perfect menu during game-play But its on a different layout then the current game layout. How can I switch between the layout keeping the character position relatively the same when exiting the menu state.

Is there an easy code to do that or will I be better off redoing it all into layers since My main game will have multiple layer anyway.
B
52
S
24
G
6
Posts: 391
Reputation: 7,845

Post » Wed Jul 08, 2015 7:09 pm

1. I will say it's better to have a different sprite for each new type of monster. Of course this will take a little bit of the size of your game as well as your game performance, but the difference won't be that big and having different sprites will allow you to use different instance variables and behaviors, giving you more freedom to create many kinds of monsters but it'll also be easier organize your code, and if you ever need to apply the same event, behavior or variable you can always use a family for that.

2. You can try to use the Local Storage to save all kind of data from a layout and then you can load all of it when exiting the menu layout... terrible idea.
Or you can save the game through the save function, and then you save on Local Storage the menu information. When you call the load function the game will load exactly how it was at the moment you saved it, so you can use this to return to the same layout position and condition and then load the data from the Local Storage to apply to the layout the changes made at the menu... Better than the first idea but I still won't recommend it.

So yes, the best thing to do here is use the menu in a different layer. But don't worry you won't need to redo everything. Instead just set the layer from the menu layout as a global layer. Then at the game layout you create a layer with the same name and you are good to go. The only thing you will need to do is transfer the codes from one event sheet to another.

Hope this helps o/
B
17
S
7
Posts: 277
Reputation: 2,514

Post » Wed Jul 08, 2015 7:19 pm

As for the second question, are you talking about something like a global UI or menu system that can be used on multiple layouts? Here's a good tutorial for one of those: https://www.scirra.com/tutorials/594/bu ... terface-ui
B
11
S
2
G
1
Posts: 79
Reputation: 842

Post » Wed Jul 08, 2015 10:27 pm

@thomasP That is close but The thing is when you play an rpg do you want your layout to keep restarting everytime you open up a menu to check on inventory quest and others blah blah blah stuff.

And im going to try to do @Rayki suggestion first ill post back when It works or if i will have more trouble
B
52
S
24
G
6
Posts: 391
Reputation: 7,845

Post » Thu Jul 09, 2015 3:26 am

You don't restart the layout, you simply make the layer invisible when the menu isn't open and then visible when it is. It doesn't require changing layouts at all except that initial load to pull the objects on the layer in.
B
11
S
2
G
1
Posts: 79
Reputation: 842

Post » Thu Jul 09, 2015 5:05 am

B
15
S
2
Posts: 69
Reputation: 1,270

Post » Fri Jul 10, 2015 2:20 am

Thank you @rayki and @thomasP I never thought that global layer would be a thing that trick is perfect for hud and menu editing so that your not constantly having to find it on the same layout
B
52
S
24
G
6
Posts: 391
Reputation: 7,845


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 12 guests