How do I create the same event for multiple players

Get help using Construct 2

Post » Wed Jan 21, 2015 11:59 pm

Hi,

I am not sure if this is possible or not, but just wondering if anyone would know of a way to create one set of events for different characters/ players.

Explanation: So I am creating a game that the player can select up to 4 different characters all with their own animations (Same names, Same frame numbers etc) and when the layout starts the chosen character is created and pinned to the single bg object. I.E. same for each one. I would like to have more, but my current approach makes it very tedious and painful, especially if there is an error in an event.

So the problem is that I seem to have to write the same event 4 times depending on the character chosen.

So if they choose a ninja, then I have to write ninja events for all the animations depending on the action and so on for each other character, which produces 4 events for the same action.

I.E.
If character = ninjaboy and right arrow pressed set ninjaboy animation running etc etc
If character = ninjagirl and right arrow pressed set ninjagirl animation running etc etc
If character = soldierboy and right arrow pressed set soldierboy animation running etc etc
etc.

I also have spriter pro in which I can map character parts on the fly using the same animation, so not sure if something similar can be done here or maybe there is a different way.

I could probably add all the animations of all the characters into a single sprite, then select the animation depending on the character, but when I have 9 animations per character I have to add 36 validations which is the same as having separate characters with their own animations.

Perhaps a search and replace on highlighted events would make things easier so I could create all the events for one character, copy / paste then replace? Enhancment :)

Thanks,

Paul
B
6
S
2
Posts: 38
Reputation: 567

Post » Thu Jan 22, 2015 12:04 am

You could make all of the characters the same sprite and have different animation sets for each character.
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Thu Jan 22, 2015 12:06 am

Hi BriggyBros,

Thanks for the quick answer. Yes I think this is the only way I can see of doing it. I guess once in place and there is a problem with the event the fix will be quicker than doing multiple events.

Cheers,
B
6
S
2
Posts: 38
Reputation: 567

Post » Thu Jan 22, 2015 12:11 am

You can also use family's for this https://www.scirra.com/manual/142/families
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Thu Jan 22, 2015 12:13 am

Yes I have tried families previously on a different game but had mixed success. I might take another look at this again. Thanks
B
6
S
2
Posts: 38
Reputation: 567

Post » Thu Jan 22, 2015 3:58 pm

If your sprites have many animations families would be better. I only really use the frame method for static objects.
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 31 guests