How do I Multiple characters with male/female counter parts

Get help using Construct 2

Post » Mon Mar 20, 2017 10:38 pm

Hello, I’m in the middle of putting a game together on paper. Then playing around with the idea with a test game. However this is starting to confuse me a bit.....
Basically, I’m stuck on how to do things such as give said characters different abilities and after they have chosen from a character select screen. (e.g. https://gyazo.com/22d5eedeca5a8fc15d88641e496d6540 ) as I have it now I figured out how to have a skin then pin the character to said pin. Although I don’t know how to pin a specific character…

This is the solution I came up with (e.g. https://gyazo.com/683e28961664b964cc33d6e8d777f71a) although in all honesty I don’t entirely understand how it works as I put it together from a series of tutorials and examples I have on hand.
Basically what I’m trying to accomplish is after the character is selected I want different variables such as hp and abilities to be available when the character has selected a specific class. as well as whether the character will be male or female ( i some what have an idea on how this will work. but any easier methods will be helpful as well)

edit: I also assume i need to save the player's choice based on what character he selected. and i guess also save what abilities he has available to him/her.



Hopefully this is clear enough so I can get the help I need…..
B
8
S
1
G
7
Posts: 11
Reputation: 3,926

Post » Mon Mar 20, 2017 10:50 pm

I sadly didnt find my old builds with something similar but I remember what I did was change animations depending on the variable.
Lets suppose:

VarCharacter:
is a number where 0 = none 1 = male etc.

So lets suppose you click on male avatar, the variable VarCharacter will be set up to 1. And animations will be laded accordingly. If you want to have different heads but same body you just need to pin the head to a point (you add a new point in the animations frames called head)

Something like that. Dont hesitate to ask more questions if its not too clear.
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Mon Mar 20, 2017 11:02 pm

Is ok, but the choosing can be done in only 2 events.

https://www.dropbox.com/s/a1szzr83wb1jl ... .capx?dl=0
B
33
S
18
G
27
Posts: 2,434
Reputation: 20,332

Post » Mon Mar 20, 2017 11:06 pm

FraktalZero wrote:I sadly didnt find my old builds with something similar but I remember what I did was change animations depending on the variable.
Lets suppose:

VarCharacter:
is a number where 0 = none 1 = male etc.

So lets suppose you click on male avatar, the variable VarCharacter will be set up to 1. And animations will be laded accordingly. If you want to have different heads but same body you just need to pin the head to a point (you add a new point in the animations frames called head)

Something like that. Dont hesitate to ask more questions if its not too clear.


Thank you for responding. I was initially thinking of doing something similar (but due to just getting started and being unable to figure out how it'll work in my head) I just ended up thinking of using similar method I am now. Such as both male and female classes being chosen on character select. I could easily add it since I have a basic understanding of how I added/stored the previous classes. It’s just a manner of making additional choices for the player to scroll too. What I’m really struggling with now is how I would give these characters different abilities based on the player's choice. ( mage will get a different form of attack such as a ball of energy) and the tank( would get more hp... I think I could just edit this based on giving an instance variable although in all honestly I don't know how that would work) and the thief (would get increased damage)
B
8
S
1
G
7
Posts: 11
Reputation: 3,926

Post » Mon Mar 20, 2017 11:10 pm

99Instances2Go wrote:Is ok, but the choosing can be done in only 2 events.

https://www.dropbox.com/s/a1szzr83wb1jl ... .capx?dl=0


Thank you. But would this work if separate characters had their own animations? http://prntscr.com/emgfxb each folder will have different animations such a moving and attacking states. If you could further explain how to accomplish this that would be extremely helpful! I apologize if the answer is right in front of me. The method IV accomplished is the only one I’m aware of.
B
8
S
1
G
7
Posts: 11
Reputation: 3,926

Post » Tue Mar 21, 2017 12:01 am

Why are you choosing a frame then ?
Well, animations in the 'chooser' is no problem.

https://www.dropbox.com/s/eknk94761sdp0 ... .capx?dl=0

For the actual play character. I would not organise the animations in folders as you do. Even in folders the animations can not have the same name. You end up with, if you want to dynamical access the animations, something like "walk1" .. "walk2" .. "walk3" They are dynamical accessible by "walk"&str(CHAMP) as expression. Still, a burden, easy to make mistakes. And if you replace one 'from source' all the animations (i think) get replaced.

I would make a different object for each character. Put them in a family. Make them global.
Before going to the next layout i would spawn the right character on a global layer. Now this character will just be there in every level on the layer with the same name as that global layer in the chooser layout. And keep its instance variables when going to a new layout level.

Each event in the actual game events will address the family, ofcours. Very easy if you want to add characters later. Just add it to the family.
B
33
S
18
G
27
Posts: 2,434
Reputation: 20,332

Post » Tue Mar 21, 2017 12:46 am

99Instances2Go wrote:Why are you choosing a frame then ?
Well, animations in the 'chooser' is no problem.

https://www.dropbox.com/s/eknk94761sdp0 ... .capx?dl=0

For the actual play character. I would not organise the animations in folders as you do. Even in folders the animations can not have the same name. You end up with, if you want to dynamical access the animations, something like "walk1" .. "walk2" .. "walk3" They are dynamical accessible by "walk"&str(CHAMP) as expression. Still, a burden, easy to make mistakes. And if you replace one 'from source' all the animations (i think) get replaced.

I would make a different object for each character. Put them in a family. Make them global.
Before going to the next layout i would spawn the right character on a global layer. Now this character will just be there in every level on the layer with the same name as that global layer in the chooser layout. And keep its instance variables when going to a new layout level.

Each event in the actual game events will address the family, ofcours. Very easy if you want to add characters later. Just add it to the family.

https://www.dropbox.com/s/8uhv27724xea7 ... aproj?dl=0 - maybe this will help clarify what i'm doing. i think i figured it out. if you want to take a look then make it simpler you can. now what i'm going to attempt to figure out is how to give the player exlusive abilities based on the character chosen.
B
8
S
1
G
7
Posts: 11
Reputation: 3,926


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 7 guests