Chop head off a character

Get help using Construct 2

Post » Tue Feb 19, 2013 1:29 pm

Hello

I am making a platform adventure game and was wondering if anyone has had success with making a system where you could chop the head of a zombie or something similar. I guess it would be something using image points and separate sprites for head, arms.

Would like to use Spriter to create the character in, and then be able to take off an arm, if something like a sword hit the shoulder area, etc.

Any ideas?
B
17
S
4
G
5
Posts: 36
Reputation: 5,077

Post » Tue Feb 19, 2013 2:34 pm

This isn't a definte answer but hopefully something you can use. You may want to look into containers. A container is something that contains other objects. When you create the parent object, its children are created as well automatically.

I'm thinking maybe you can make a parent object that's invisible (like just a box or something to make collision detection proper), and then have each body part be a child.

You could add a behaviour for the body parts using physics, but only have the physics be enabled if the body part is hit, so as to make it fall off or something.

Hope that was the least bit helpful :)EightBitBattleCa2013-02-19 14:36:50
B
6
S
1
Posts: 41
Reputation: 762

Post » Tue Feb 19, 2013 2:55 pm

Containers are kind of limited in that situation - you can't destroy only one object in container because destroying one will destroy whole conteiner.

viking78 will You use Spriter for animations only or with spriter C2 plugin to anmate them in C2?

I'm not sure how Spriter plugin will behave if one or few of the objects used in animation are destroyed (@lucid will animation for others part continue?).

For chopping body part You could use bullet behavior with gravity - to shoot them a little upward and slowly fall to the ground.

For that you can either destroy and create new sprite with bullet or activate bullet for currently chopped part - again not sure how this will behave with spruter plugin.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Tue Feb 19, 2013 3:05 pm

The idea was to use Spriter to animate and then import the file into Construct2. I had considered Containers but it seemed impractical / impossible.

If I was not using Spriter I would probably need to build a ragdoll system where the different limbs were attached at imagepoints. But then I would have to write some kind of animation system for the limbs as well I guess... Seems like a lot work.
B
17
S
4
G
5
Posts: 36
Reputation: 5,077

Post » Tue Feb 19, 2013 4:47 pm

You can get away with containers if you simply hide the head, then destroy it along with the body when the rest of the body is killed.

B
50
S
21
G
8
Posts: 844
Reputation: 10,299

Post » Tue Feb 19, 2013 11:01 pm

Here is basic idea

http://dl.dropbox.com/u/76227787/headchopoff.capx

You can use arrow keys to move the character and click any part like arms, legs and head.

Not so dynamic style, i have another idea how to make it working for sprite animations, the helpers are invisible sprites to join their parts should work, i make another .capx when i get chanceJoannesalfa2013-02-19 23:02:30
B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642

Post » Wed Feb 20, 2013 7:16 am

Great, will check it out! Thanks :)
B
17
S
4
G
5
Posts: 36
Reputation: 5,077


Return to How do I....?

Who is online

Users browsing this forum: WhosWho and 16 guests