Solid Object issues

Get help using Construct 2

Post » Tue Jan 29, 2013 3:42 am

I've been sort of making somewhat of a Hack and Slash to try to learn Construct 2, and I've seem to run into an issue with the Solid behavior.

My player model is made up of three sprites, one for his body and one for each of his arms. His left arm only has one 2 frame animation, one for holding his shield up to block, and the other with the shield at his side. When I hold right click, it sets it to the frame for blocking, and changes back to the other frame when I release it. My problem is that I want to make his shield a Solid object, but it won't work despite the Solid behavior I put on the sprite. I initially wanted to make the Solid behavior toggle with the frames, but I've since just started trying to get the solid behavior to work on this sprite at all. I made a new sprite and added the solid behavior to it, and it seemed to work fine.

I read some places that said something about the objects needing the 8Direction behavior, but even adding that did nothing and I have other objects with working solid behaviors and no 8direction.

https://docs.google.com/file/d/0B33EgxAFaaceTmd4S3M0QXR6T3M/edit is the CAPX of my game where I ran into the issue.
B
3
Posts: 4
Reputation: 358

Post » Tue Jan 29, 2013 4:29 am

Did you check the collision box for it and see if maybe it wasn't made properly?
B
16
S
2
Posts: 85
Reputation: 1,479

Post » Tue Jan 29, 2013 3:57 pm

I've checked and rechecked. I extended the hitbox so it would overlap with the hitbox for the player's body, and it caused it to freak out and bounce around like I expected, I just can't get the shield to otherwise be solid.
B
3
Posts: 4
Reputation: 358

Post » Tue Jan 29, 2013 4:44 pm

The solid behavior interacts with Platform, 8Direction, Car and Bullet (when bounce off solids is enabled). Two solid objects won't interact with each other otherwise you couldn't have overlapping walls, floor etc. I assume that's what your problem is - that you have the shield and enemy set to solid and think the shield shouldn't overlap the enemy? You'd want to give the enemy 8Direction behavior and remove Solid. Or if that's not the problem, what do you mean when you say it won't work?
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Wed Jan 30, 2013 1:24 am

[QUOTE=ramones] The solid behavior interacts with Platform, 8Direction, Car and Bullet (when bounce off solids is enabled). Two solid objects won't interact with each other otherwise you couldn't have overlapping walls, floor etc. I assume that's what your problem is - that you have the shield and enemy set to solid and think the shield shouldn't overlap the enemy? You'd want to give the enemy 8Direction behavior and remove Solid. Or if that's not the problem, what do you mean when you say it won't work?[/QUOTE]

I realized my issue was I never had 8Direction on the enemies. I intended to put it on them, but I seem to have gotten a bit ahead of myself. Thanks for your help.
B
3
Posts: 4
Reputation: 358


Return to How do I....?

Who is online

Users browsing this forum: alextro and 0 guests