Saving a 'costume' between 2 layouts in a dress-up game

Get help using Construct 2

Post » Sat Feb 04, 2017 8:25 am

I have a 'closet' layout where you can 'dress up' a cactus that I want to bring to my other layout which is the 'shelf'/display layout where you can view your cacti. I'm not sure how I can bring my dressed up cactus from one layout, to my shelf/display layout?

Also, should I be using an array or something to sort my closet items out? I only have a very general idea of what arrays are and have never used one, any help or
direction would be greatly appreciated. Thanks very much!!

Image
B
5
S
1
Posts: 2
Reputation: 335

Post » Sat Feb 04, 2017 5:17 pm

When dressed is the cactus still one object? Is it a few sprites attached together?
B
46
S
16
G
73
Posts: 2,080
Reputation: 43,669

Post » Sat Feb 18, 2017 9:07 am

plinkie wrote:When dressed is the cactus still one object? Is it a few sprites attached together?


Yes, the cactus and clothes are separate objects. It's a few sprites attached together.
B
5
S
1
Posts: 2
Reputation: 335

Post » Sat Feb 18, 2017 10:29 am

Create the costume and place it in the same spot as the head of the cactus.
Let the first frame always be a BLANK IMAGE.
Keep other costume styles in the next frames

-Create a Global Variable for the hat frame

-Every tick set the Hat animation frame to Global Variable Hat_Style. That way Hat_style = 0 is always blank.
-Don't forget to stop hat animation at the start of a layout
Image Image Image
B
29
S
11
G
27
Posts: 730
Reputation: 17,002

Post » Sun Feb 19, 2017 12:41 am

You will need to have the cactus and clothing in all layout where it will be used if they are separate sprites.

You can set them to be attached using a global variable that will pass information between layouts.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,780


Return to How do I....?

Who is online

Users browsing this forum: rengo, Yahoo [Bot] and 28 guests