5 diffrent Player-Skins

Get help using Construct 2

Post » Sat Feb 22, 2014 12:42 pm

Hi guys,

I want to allow my players to change the skins of there player. I have a blank sprite called player and 5 sprites that i can pin on that, so i want to create a layer where the user can chose which skin should be pinned on blank player.

Next step was to create an event locking 4 skins (only the default/first skin will be avalabile). But i don't know how to add this.

Here is a blank project file with all elements include
https://drive.google.com/file/d/0Bz4Kps ... sp=sharing
Mabye some can help me out with the event or just can tell me how to do that ;)

  • Menu layout: 1 Skin should be avalabile (skin1 sprite should be shown) / other 4 skins should be locked (showing the "locked" sprite)
  • The skin1 sprite is the default skin which is pinned to the "player" sprite
  • After a player reached a score about 50 points for instance, the skin2 should also be unlocked and shown in the menu (2 unlocked / 3 locked)
  • Now if someone picks the skin2 the skin1 should be unpinned and skin2 should be pinned to the player sprite

I guess it will work with a bolean (true/false) but i don't know how i can say in the event, if locked show locked sprite and if the skin1-5 are unlocked show their sprites instead of the locked sprite.

Hope you can follow me, its difficult to explain in english ;) Thanks for any help!
Posts: 1,173
Reputation: 29,260

Post » Sat Feb 22, 2014 3:01 pm

Hard to understrand what are you looking.

You don't need to make separated sprites each different skin and pin to player, you should organize the animations.

Let's see, you should create a global variable with type text such as SkinColor and the values like "Red", "Blue", "Green", etc.

Do a list of animations as Red_Walk, Blue_Walk, Green_Walk, etc.

When a level is completed, you should call to set SkinColor to any color you want and set animation like:


About the locking grey sprite you need to add instance variable LevelRequired, each level is finished it should add 1 to global variable CurrentLevel.

For example

If grey sprite has level 3 required to unlock, other has level 4 required to unlock.

There an implementation it should work all locking sprites.

Compare instance

locked.LevelRequired <= CurrentLevel
Trigger Once (or any trigger like on Start Layout)

Set Boolean locked to false

I hope it helps you.
Posts: 3,139
Reputation: 28,421

Return to How do I....?

Who is online

Users browsing this forum: dop2000, Seruza and 8 guests