How to use a spriter object multiple times

Discussion and feedback on Construct 2

Post » Fri Aug 14, 2015 11:08 am

I am using SPRITER for animations. How can I clone an imported spriter set / object to animate two different characters at the same time?

For example to animate both P1 and P2, which have the same animations, but different clothes/heads.
Last edited by fundation2000 on Fri Aug 14, 2015 4:41 pm, edited 1 time in total.
B
10
S
2
Posts: 32
Reputation: 672

Post » Fri Aug 14, 2015 4:16 pm

Same way you would check use any SOL. Do a condition check first to compare info that builds a 1 object SOL.

https://www.scirra.com/manual/29/object-type

Often I find for comparing players. Is to just create an instance variable in the player objects. and then object.playerName == [playerName]


If you deciding to use different Objects such as duplicated rather than Copy/Paste instances. Then put them both into a family, and make the comparison in the family.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Tue Aug 18, 2015 6:17 am

Sorry I can't really follow. Spriter objects are tied together via the animation object. If I duplicate them I get the same sprites. How do I get the second object to have, say, a different head?
B
10
S
2
Posts: 32
Reputation: 672

Post » Tue Aug 18, 2015 6:38 am

I'm currently finding this to be a pain in the butt right now as well. So I would love to see what people suggest.

Take your spriter object and choose a different entity.
Assuming you have your player1/2 as different entities.
@lucid recommended me to choose the object from the layout and you can choose the starting entity for each instance there.

But then you also need to keep in mind they are the same object. So you have to keep track of instances.
If your project has more animations and entities this only becomes increasingly confusing and difficult to work with and get animations, instances, and entities to all play nicely together.

My current issue is how to work with instances not created in the editor/at runtime. Instances created dynamically make this object much harder to work with than your standard objects.
In my case this one object is my:
"player"
background
enemies
scenery
effects
everything visual....

So I am currently at a loss how I am supposed to manage my spriter project in construct at this point.
B
28
S
8
G
1
Posts: 226
Reputation: 2,865

Post » Tue Aug 18, 2015 7:17 am

My current solution is to create two different spriter files and import them separately. This only works because I only need two animated characters, but is not a good solution for many characters and animations. For background and the environment (falling leaves etc) I just use the normal construct animations, so I don't have to deal with too many spriter instances.

I think I remember seeing a capx where there were over 20 spriter characters in the same scene, but I can't find it.
B
10
S
2
Posts: 32
Reputation: 672

Post » Tue Aug 18, 2015 10:18 pm

@Tylermon, I responded here: viewtopic.php?f=146&t=75748&p=962255#p962255
Spriter Dev
B
99
S
21
G
12
Posts: 3,259
Reputation: 16,894


Return to Construct 2 General

Who is online

Users browsing this forum: Celeb, NS2SO, purplemonkey, striimix and 1 guest