5 diffrent Player-Skins

0 favourites
  • 2 posts
From the Asset Store
This is a code so you can see the same skin on all screens (peers). Each peer gets a skin, in addition to 4 directions t
  • 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 <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    Overview

    • 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 <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> Thanks for any help!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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:

    SkinColor&"_Walk"

    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

    Event:

    locked.LevelRequired <= CurrentLevel

    Trigger Once (or any trigger like on Start Layout)

    Action:

    Set Boolean locked to false

    I hope it helps you.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)