Object collisions

For questions about using Classic.

Post » Fri Feb 27, 2009 8:48 pm

Now I've made my assets , and moving to construct-ing . Before I go further , how do I make collision masks for my character ? That button in the sprite editor doesn't seem to do anything.
B
2
G
3
Posts: 29
Reputation: 908

Post » Fri Feb 27, 2009 9:05 pm

collision masks are currently broken.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Fri Feb 27, 2009 10:48 pm

I don't think "currently broken" is the right term... I'm fairly certain they were never actually implemented. I think it was David who started the work on them, and somewhere along the line the button to use them got left in the image editor.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Feb 27, 2009 11:21 pm

Okay , so ... any other way to help the samurai to cut his enemies ?

I was thinking of using "is overlapping" as it would be the fastest check.
B
2
G
3
Posts: 29
Reputation: 908

Post » Sat Feb 28, 2009 12:18 am

Well, you could always use a dummy sprite. Like you use it for the player itself.

Create a sprite of the desired shape and spawn it at a certain image point when the player is attacking. Then destroy it when the animation is over. Now you can check for overlap with this sprite.

I guess that's kind of what you asked for... I'm hoping. :P

If not feel free to go more into detail.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Sat Feb 28, 2009 12:21 am

Custom collision masks haven't been implemented yet, but it is something we plan to do.

Until then I'd use a dummy sprite.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sat Feb 28, 2009 3:45 am

Using a hidden collision object is the right way to go, so your character can still get hit (e.g. from behind) when he is attacking. Create a sprite that mimics the animation of the sword swing, but only contains the blade, call it sword mask and make it hidden.

Then, when you initiate the sword attack, spawn your sword mask using an image point to line it up correctly. You can set up collision events between the sword mask and members of the enemy family to do damage to the enemies, but you can still have the enemies hurt the samurai if they attack from behind. Then you just need to remove the sword mask when the samurai attack animation finishes.

Although, I should point out, this is completely untested.
B
2
S
2
G
3
Posts: 105
Reputation: 1,510

Post » Sat Feb 28, 2009 4:46 pm

Awright... by the time I reach the stage for detecting collisions though , I guess Construct will have that feature. But it'll work for now. All I have to do is set animations to the "dummy" alongwith the character.
B
2
G
3
Posts: 29
Reputation: 908


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests