How Do I Place Sprite Body Parts Together?

Get help using Construct 2

Post » Wed Jun 19, 2013 12:22 pm

Hi everyone,

im wondering how to go about placing my character sprite together if i have him in two seperate sprites,For instance i have his hands seperate from his body for item switching.The hands have seperate animations along with the body,is it possible for me to pin my Hand animation to my body sprite and have them both work independently? I needed this for bounding Box reasons also so i can make my character carry bigger weapons.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Wed Jun 19, 2013 1:38 pm

Would it work to set the hands position every tick to the body, then on each animation frame create a custom image point and set the exact position to body.x imagepoint(1) body.y imagepoint(2)
Or something similar to this?
This way you can move the hands with the animation and ensure there always in the right place?
B
13
S
2
Posts: 87
Reputation: 1,244

Post » Wed Jun 19, 2013 1:49 pm

I just pin my PlayerImage sprite/animations to my Player sprite at the start of the layout as advised in the platformer beginner tutorial/s, that seems to work fine and doesn't need updating each tick.

The Player sprite is just a basic rectangle for collision impact purposes. You should be able to pin hands to your torso in the same manner though whether you've used a basic rectangle as your Player or gone with one with it's own animations etc.

Edit: I've re-read your post, sounds like the reasoning for your question is that you just want to keep a standard sized bounding box/collision shape? Using a basic rectangle as the Player as advised would solve this I think without having to pin hands on?Zantium2013-06-19 13:52:01
B
14
S
3
G
2
Posts: 59
Reputation: 2,180

Post » Wed Jun 19, 2013 1:53 pm

Pinning and setting every tick is basically the same. It's all about preference, the position of the object would have to update every tick even if you pin it.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Wed Jun 19, 2013 7:46 pm

Thanks You Guys,And if i was being alittle confusing its because this is my first Character in peices that i have tried to place together as one.I just dont understand the events i should use after pinning it,Like you said @Nimtrix i will need to update the position every tick for it to look like its naturally one sprite. @Zantium @Richard Stennett thanks guys for replying.like i said this is my first character in parts like this.I am redoing my whole character to make it better for the player.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Wed Jun 19, 2013 7:52 pm

You could also just use something like Spriter to do this as it is free currently. You take the sprite pieces, then import them to create the animations with all the pieces.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Wed Jun 19, 2013 7:55 pm

@BluePhaze the spriter plugin work on Mobile devices? And i am not sure if spriter works with sprites peices that are as small as mine.Tweening would be alittle crazy being they are so tiny.I have them preanimated in parts so the animating is there i just need to pin it to the main character.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Wed Jun 19, 2013 8:08 pm

Joints? I have used few of them in my current project. Actually a lot of them...
B
16
S
5
G
4
Posts: 74
Reputation: 3,311

Post » Thu Jun 20, 2013 1:02 am

@RookieDev the size doesn't matter, SPriter keeps track of each image and where it moves to. It is just XML in the back end saying take this image and move it here over this amount of time. Spriter is a huge saver on file size as well since you don't have a separate image file for each frame. Just the same image files moved around.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Thu Jun 20, 2013 11:16 pm

@BluePhaze I actually downloaded the free version of Spriter last night, it's a great program.
I haven't looked at actually using it as a plugin yet, just for animating instead of spending the 12 hours I previously did hand drawing all my walking frames. I liked it so much I bought the Pro version today, I don't need it, I just thought they deserved the money. Zantium2013-06-20 23:17:41
B
14
S
3
G
2
Posts: 59
Reputation: 2,180

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests