"Main" character

This forum is currently in read-only mode.
From the Asset Store
2d mushroom sprite 2d game mushroom character enmy sprite game art
  • Alright, so now right now i'm making some kind of 2D Hack & slash, and there are different playable characters choosable. So let's say I have characters 1, 2 and 3. There's a first layout to select the character you want to play, and it sets a global variable that will determinate which character you choose, so that it's the playable character. Now you get to the second layout, so on the side there are the sprites for character 1,2 and 3, but what I would like to do is that the chosen character, and HIM only, is playable (which means that he spawns, is controlled by the 8 directions behaviour, is targeted by the ennemies) The problem is that I have to put the behaviours for each character, in case he gets chosen, but only the chosen one is really "active", so how could I do that

    Thanks a lot for any help, I know it sounds kind of messy, but I don't know how I could explain it better...

  • Should be simple enough, either compare which one was selected and destroy all the others. Assume character 2 is selected: for any character object's value that doesn't equal 2 -> destroy.

    You can also disable the behaviors so that effectively only one of them is controlled. Also if your characters are simple enough you could just use different animations on the same sprite instead of different objects. It's not really too feasible a solution if you have anything more complex than a few frames per character.

    http://up.servut.us/39892 (CC r2 cap)

    This example has different character objects that are destroyed accordingly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you I'll take a look at that, I was trying to do something like that, but you made everything clear, thanks !

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