How to make an in-game shop that customizes the player?

Get help using Construct 2

Post » Fri Apr 25, 2014 3:17 am

I want to make a shop inside of my game where I can buy accessories like helmets and or clothing and equip them to my player. My original thought was to make animation frames with the accessories added in and then just switch the player's frames when I buy the clothing or gear but I realized that I can't change the animation frames of my player from a different layout. Help is greatly appreciated.
B
37
S
14
G
3
Posts: 263
Reputation: 4,270

Post » Fri Apr 25, 2014 3:28 am

I want to make a shop inside of my game where I can buy accessories like helmets and or clothing and equip them to my player. My original thought was to make animation frames with the accessories added in and then just switch the player's frames when I buy the clothing or gear but I realized that I can't change the animation frames of my player from a different layout. Help is greatly appreciated.

:D Why don't you continue the old post?

I think you misunderstood what I said in that post, you can do it, if you change the player to global. And its the easiest way you can do it. You just have to make you game work with the player as an global object. The reason I said that you might experience some weird problems, is if you have made some of the game already and then suddenly change the player to global, you might experience some unexpected things. But you should just be aware of it and fix them if they occur.
If you plan on using your player object on different layouts its a good idea to do It, as you will most likely have to later on anyway.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,838

Post » Fri Apr 25, 2014 3:55 am

@nimos100 The reason I didn't continue that post was because I actually did switch the player as a global object. I read your response and it sounded like a perfect solution but when I tested it, it still didn't change the player's animation frame. I tried to change it with a button and then after that, I went to the other layout by clicking another button but it didn't work. I started this thread because I figured what I was trying to accomplish was impossible through the way I tried. I was going to reply but I got sidetracked :P Sorry
B
37
S
14
G
3
Posts: 263
Reputation: 4,270

Post » Fri Apr 25, 2014 7:03 am

Maybe this can Help you..

This Tutorial Created by @Shirokuma
You do not have the required permissions to view the files attached to this post.
~Everyone can make GAMEs~
B
55
S
11
G
1
Posts: 414
Reputation: 5,786

Post » Fri Apr 25, 2014 12:19 pm

The reason I didn't continue that post was because I actually did switch the player as a global object. I read your response and it sounded like a perfect solution but when I tested it, it still didn't change the player's animation frame. I tried to change it with a button and then after that, I went to the other layout by clicking another button but it didn't work. I started this thread because I figured what I was trying to accomplish was impossible through the way I tried. I was going to reply but I got sidetracked :P Sorry

Its ok just confusing when the issue gets separated over several posts, and people might start to answer in both of them. :)

Anyway sounds weird that you couldn't get it to work, you must have done something wrong then, I made a very simple example of how to do it.
If you notice layout 2 is completely empty, but as you switch it seems all the buttons and object appear there, and its because I made them all global, and they use the same event sheet, but you could just as well have made them use there own one.

Image
You do not have the required permissions to view the files attached to this post.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,838

Post » Fri Apr 25, 2014 3:31 pm

@nimos100 Thanks for the capx but I still cannot get it to work even after a hour or two of modifications and changes. Is there any other way I can make a shop where I can customize the player?
B
37
S
14
G
3
Posts: 263
Reputation: 4,270

Post » Fri Apr 25, 2014 3:47 pm

Try to apply Capx.

Or you can store it in global variable and then as you switch layout read the value from this one during start of layout.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,838

Post » Fri Apr 25, 2014 8:50 pm

@nimos100 nothing really seems to be working. I applied the capx but it doesn't change the animation frame still. I appreciate the help but I think I might just scrap the store idea because its just won't work :(
B
37
S
14
G
3
Posts: 263
Reputation: 4,270

Post » Fri Apr 25, 2014 8:55 pm

nothing really seems to be working. I applied the capx but it doesn't change the animation frame still. I appreciate the help but I think I might just scrap the store idea because its just won't work :(


What I meant was try to upload the Capx then ill take a look at it.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,838


Return to How do I....?

Who is online

Users browsing this forum: dop2000, TheRealDannyyy and 68 guests