"Main" character

For questions about using Classic.

Post » Fri Aug 31, 2012 9:51 pm

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...
B
8
S
2
G
2
Posts: 15
Reputation: 1,691

Post » Sat Sep 01, 2012 11:11 am

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.Zotged2012-09-01 11:13:13
B
11
S
2
G
3
Posts: 100
Reputation: 2,150

Post » Sat Sep 01, 2012 12:47 pm

Thank you I'll take a look at that, I was trying to do something like that, but you made everything clear, thanks !
B
8
S
2
G
2
Posts: 15
Reputation: 1,691


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests