character customization

Get help using Construct 2

Post » Sat Jun 29, 2013 7:58 am

hey, so i wanted to do a player customization, just like this:
http://www.scirra.com/arcade/example/5019/character-customization-demo

but i dont know how i can save the player in question to the game, and start... in the case of the demo, when we press space the game starts with the character we created, can someone send me a capx, so i can see the events please. :Dkionysan2013-06-29 07:58:52
B
5
Posts: 77
Reputation: 604

Post » Sat Jun 29, 2013 9:22 am

Hi @kionysan,

This is probably quite simple to do. I'm guessing that the charachter is split into 3 sections (top, middle, and bottom). The animation for each section would hold the number of changes you wanted to make as separate frames (red top, green top, blue top... you get the idea). When the user clicks on a button it changes the frame for that section, and that's it!

To save your character, you could just use variables to remember which frames you chose for which sections.

It may be worth taking a look through the 'How do I' section, as it has lots of good examples and should help to familiarise you with the C2 basics

'How do I'

Hope that helps :)Blacksmith2013-06-29 09:23:51
B
33
S
6
G
7
Posts: 494
Reputation: 8,252

Post » Sat Jun 29, 2013 11:47 am

hmm, i figured it was something like that, but can you tell me specificaly what event it is? to save the frames? thank you
B
5
Posts: 77
Reputation: 604

Post » Sat Jun 29, 2013 1:38 pm

When you create a sprite object in construct2 you can choose how many animation frames you want. So you'll probably need a sprite object for "legs", "body", and "head" for a simple character creator.

I guess when you click the right button near the head it adds 1 to the animation frame, changing the frame of the sprite object.

Someone did post a character creator somewhere here, so try digging through the forums, I'm sure you'll find it.
B
18
S
4
G
3
Posts: 436
Reputation: 4,801

Post » Sat Jun 29, 2013 1:53 pm

maybe im not explaining well..i know how to make the character, i just want it to save the frames he is when i go play the game!

i change the frames and modify my character, done!
but when i go to another layout the changes arent saved, how can i save them?
B
5
Posts: 77
Reputation: 604

Post » Sat Jun 29, 2013 2:24 pm

@kionysan,

As mentioned above, you should use global variables to save your frame data.

So: varHead = 1 / varBody = 3 / varLegs = 2 etc.

If you use globals, you can carry these across layouts. And you can save them using web storage, which means you could use them across sessions as well!

Good luck!
B
33
S
6
G
7
Posts: 494
Reputation: 8,252

Post » Sat Jun 29, 2013 4:51 pm

as Black says, use variables or dictionary.
B
18
S
5
G
4
Posts: 568
Reputation: 5,079

Post » Sat Jun 29, 2013 4:55 pm

btw, you need to insert "Webstorage" object to save stuff.
B
18
S
5
G
4
Posts: 568
Reputation: 5,079


Return to How do I....?

Who is online

Users browsing this forum: dokthor, Eren, Google [Bot], maldrok, OddConfection, zenox98 and 9 guests