How to easily change characters and backgrounds?

0 favourites
  • 2 posts
From the Asset Store
120 Epic Fire FX Animations + 2 Bonus Characters. Contains 3000+ frames and a lot of Pixel Art Sprites
  • Hi guys!

    I'm wondering if there is any easy way to change characters and backgrounds of my game. The game I'm making will have a menu where you can select different "skins" for the character, as wall as different "skins" for the scenario (for exemple, a scenario where is day, other where is night, other with snow, and so on).

    Is there any easy way to change characters and scenarios without having to do a different layout and event sheet for every different scenario/different character? Kinda like just swap the images of one scenario and character to the images of the other based on what the player selected in the menu,in the same layout.

    Thanksss! :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • just add all the backgrounds and character skins you want to two different objects

    so one will be background and another will be playable character

    you can then assign different backgrounds and outfits for character by drawing them and adding them as either differing frames or animations in the drawing editor

    then you just create a global number variable for each and assign each "skin" to a number

    so for example, pseudocode;

    is BackgroundGlobalNumber = 1 , then set background object's animation to "__(whatever you have named it)__" or set background object's frame to __(whichever you desire)__

    and repeat this for however many different backgrounds you want

    then all you need to do is set the conditions in which these events take place, so my guess would be something like is MenuGlobalBoolean true? then for each arrow key hit (either direction) change BackgroundGlobalNumber to __ number.

    then to close the loop (so if you only want 4 different backgrounds that cycle in the menu) just make it so if BackgroundGlobalNumber >4 then set BackgroundGlobalNumber = 1, and if BackgroundGlobalNumber <1 then set BackgroundGlobalNumber = 4. this way if it goes over 4 it always go back to 1 and vise versa.

    Then just apply the same logic to creating the different skins for your character sprite

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