This behavior requires the plugin that goes with it: construct.net/en/make-games/addons/362/skin-plugin

Skin it

Skin it is a pack containing a plugin and a behavior that will allow you to easily implement a skin system in your game.

The plugin

A skin group is a global plugin that will contain every information about a set of skin. Each skin contains a number of subskin that you set up yourself.

You can have multiple skin groups for categorisation purposes, and each group is referred to with a tag that you need to set up in the skin group's parameters.

Each skin group allows you to get a random skin and a random subskin from a given skin.

The behavior

The behavior will allow you to attach a skin to a sprite.

The default skin is whatever the sprite contains before the skin gets attached.

The skin group tag needs to be set as it can't be changed at runtime. It links the behavior to the appropriate skin group.

The skin and subskin tag are the skin values that will be used on start of layout.

Use default skin shall be set to Yes if you don't want the object to start with a skin.

Hide default skin means that the sprite will get set to invisible if a skin used, and visible if no skin is used.

A sprite can hold multiple skin behaviors, each with its own properties. The skins, then get layered following the behavior order, from top to bottom.

A skin, as it is also a sprite, can hold a skin too.

Use cases

In the demo, you will find a wearable equipment system.

You can also make a regular skin system where the character gets entirely replaced by new skins.

You can also make an NPC system where every NPC is the same sprite, but the visuals get replaced by a skin.

Skin it basically separates a sprite from its texture, making anything with dynamic texture relatively easy to set up.

The skins never need to be loaded as well. They only need to be stored in an object bank layout to have a model for creating them. You can also decide to use different resolution skins by resizing them in the object bank.

Download

2.3.1 Stable (19.53 KB)

Info

  • License MIT License
  • Copyright Ossama Jouini. All rights reserved.

Statistics

  • Download count258 total downloads
  • Latest download count 239 downloads of latest version
  • Average download count3 downloads per day average

Owners

  • 13 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • Dear Skymen

    Hello, would you make a vidoe tutorial for the sking plugin and behaviour. Actually it will clear all the mosconception of using the Skin tools

    My Regards

    Al Ali

  • Hi,

    Thanks for this nice addon! :)

    I have a problem: if I destroy a Sprite object which has a skin, the skin object is not destroyed, but it stays at the destroyed object’s last position forever. Is it a bug or I must manage the destroyment of the skin objects manually?

    Thank you in advance for your answer! :)

    • Hey, this is probably a bug, it's supposed to get destroyed with it. Could you make a minimal reproduction example so I can take a look?

  • Is there a way to make it so an object will use the new collision of it's skin sprite?

  • I've been looking for weeks now for anything that can help me figure out how to switch characters. This is my first game and I have ZERO coding experience. I thought I would make it a little more dynamic by adding "skins". They're technically just different sprites.

    Here's my problem... When I try to use a different character, the platform behavior stops working. I've tried visible/invisible, setting group behaviors, system create object, containers. I even tried one of these skin plugins which basically gave me the same result as a container. I've even tried to make separate layout but somehow it's not reading the global variable boolean I have set to take it to the playstate2 layout.

    I've read about dictionaries and arrays but just not grasping how that is any less work than simply duplicating the character 1 events and replacing with character 2, which hasn't worked either.

    Anyway, sorry so long. If you could help me figure out how this would help that would be amazing.

  • Hello! I have a question.

    How can I replace the skin of an entire character and change all the animations of it?

    • You can use Set Skin to change the skin of a character, and to change the animations, you can use Set Sub Skin.

      By default, Sub skins are automatically synced to the animation playing on the sprite you set the skin on, but you can disable that and set them manually if needed.

      • But to do this I would have to: Duplicate my character (Remove the platform behavior), change the skins and animations of the duplicate character (My character has 5 animations: jump, attack, fall, run and stop). After go to the events sheet> At the start of the layout> Select Skin Group> add Skin and add the public figure and give a "Skin Tag".

        After always at the start of the layout> I select my first character with the default skin> Set Skin and uncheck the tag put previously. Quite right? Am I skipping a few steps?

        Load more comments (1 replies)