How do I load different skills with one single object?

0 favourites
  • 5 posts
From the Asset Store
112 High-Quality destruction sounds for videogames
  • Hi, i want to make a game that the player can get many heroes with single sprite but has different skills for each other.

    1. said, i have one object called : Knight. This character have a skill (default is 100)

    2. in game play, player can upgrade this Knight skill to 200

    3. in game play, player can get this Knight character again with default skill : 100, so the player have 2 hero, Knight1 and knight2 with different skill (200 and 100)

    4. on start of layout, it will create all Knight, so if player has 5 knights, it will create 5 Knights with same Sprite, but, has different skill, so the player can choose any of knight.


    question :

    1. how to do that? should I create multiple sprites for each character(knight) I get (even if only duplicate?) then it means, i must create a hundreds object?


  • You need one knight object, with multiple instances. The skill is an instance variable that you edit.

  • Hi,thank you for your replay, but i think it is not the problem. If i do like that, i would copied the knight object sprite hundreds time before the build the game and the skill unable to edit and save, right?

    Remember, the player only have one knight when play this game for the first time, and during game play the first knight skills will be upgrade, then the player will get one more knight with lower skill.

    So the event sheet is like:

    When player close the game,

    Knight count is 2 (save it)

    the skill of first knight is 200 (save it to storage),

    Second knight is 180(save to storage)

    When open the game:

    on start of layout :

    Load knight amount to global variable

    create object knight (2 times)

    How to targeting the saved skills and load it to the knights object?

  • You don't save it to local storage you use system 'save' which saves the state of the game and all objects

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you

    Wow, sound easy, i never try it before.

    Thanks again

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