How does Solid work?

Just started using Construct 2? Post your questions here

Post » Tue Feb 07, 2017 2:20 pm

Message: lazerblade can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
After some toying around, I was able to determine that adding the 8Direction behavior to an object allowed it to be properly stopped by the Solid behavior.

However, after following https://www.scirra.com/tutorials/413/di ... -animation this help on how to make an object with direction based animation, I'm still passing right through solid objects, either over or under depending on the z-order.

I feel that if I properly understood how solid worked, I would be able to prevent this from happening. At this point, I'm at a loss.
B
4
S
1
Posts: 6
Reputation: 314

Post » Tue Feb 07, 2017 3:12 pm

Just checking, your player and solid objects both have collisions enabled right?
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Tue Feb 07, 2017 3:59 pm

Yeah, they sure do.
B
4
S
1
Posts: 6
Reputation: 314

Post » Tue Feb 07, 2017 4:16 pm

Hm, yeah sorry I don't really know much about solids except that they affect built-in behaviours like 8direction and platform, as well as physics I think? You're sure the 8direction behaviour is enabled too right?
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Tue Feb 07, 2017 4:57 pm

Yeah, the object is 8Direction and the solid object is on the same layer.
B
4
S
1
Posts: 6
Reputation: 314

Post » Tue Feb 07, 2017 5:07 pm

I went ahead and set an event for when the moving object collides with the solid object to stop, but this is not working either. Although both objects are on the same layer, they are not colliding.
B
4
S
1
Posts: 6
Reputation: 314

Post » Tue Feb 07, 2017 5:13 pm

If an object has 8-direction it should collide with a solid object, you shouldn't need to set an event to make it stop so something has gone wrong there.
B
46
S
16
G
78
Posts: 2,168
Reputation: 46,353

Post » Tue Feb 07, 2017 5:14 pm

Set the collision polygon (preferable to the bounding box) and the origin for each animation frame the same. My wild guess.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue Feb 07, 2017 5:21 pm

I checked to see if the Z Order was the same for both objects. I'd assume that even though they are on the same layer, they don't start at the same Z Order. I can set the Z Order to the top or the bottom of the layer, but the trial does not allow me to set the Z order specifically, to make sure both objects are in the same Z order to trigger a collision or even stop because they are solid. Could this be causing the trouble? If it is, it seems kind of silly, because I wouldn't be able to actually try out the software before buying it, because I can't even get objects to collide.
B
4
S
1
Posts: 6
Reputation: 314

Post » Tue Feb 07, 2017 5:28 pm

Layers and Z order are kind of irrelevant here. If you have a solid object in the level and you push into it with an 8-direction object, then they should collide. If they do not collide then you must've tweaked something with one of the objects.
B
46
S
16
G
78
Posts: 2,168
Reputation: 46,353

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest