Question to Solid Behavior

Discussion and feedback on Construct 2

Post » Sun Jul 24, 2011 4:00 pm

Hi,

layer 0 is full of sprites made solid. layer 1 has sprites without that behaviour. The player can't walk along the upper sprites, because the sprites in the first layer are solid.

How to create a kind of whitelist for moving?
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Sun Jul 24, 2011 4:57 pm

I'm not sure what you mean. Can you post a .capx? If you want the player to be able to walk on the sprites on the top layer, you can just make them solid too.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun Jul 24, 2011 5:16 pm

I'd try that, but it doesnt override the solid parameter of the first layer.

Player should walk only on the road sprites...

link
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Sun Jul 24, 2011 5:34 pm

That link doesn't seem to be working.

If you're placing non-solid objects on top of solids, that doesn't "undo" the solidness. Solid objects are always solid no matter what is on top of them. Otherwise, if you had a see-through cloud object over a rock, the player could then walk through the rock!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun Jul 24, 2011 6:06 pm

I've updated the link since i cant link to unknown filetypes on this server.

new linkxeed2011-07-24 18:08:01
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Sun Jul 24, 2011 7:01 pm

Don't make the grass or road solid! It works fine if you remove the Solid behavior from them. 'Solid' means you cannot move inside or through it at all. Think of a solid thing like a rock. If the grass is solid, it's like starting your car embedded in a giant rock. Of course you can't move anywhere! You should only use it on tyres, barriers and other objects that you can bump in to.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun Jul 24, 2011 9:32 pm

[QUOTE=Ashley] Don't make the grass or road solid! It works fine if you remove the Solid behavior from them. [/QUOTE]

I understand the solid thing, but I dont want the player to be moving on grass generally. He should ONLY move on roads, while the road sides stay transparent for the grass to shine through. How can i solve that?xeed2011-07-24 21:33:56
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Sun Jul 24, 2011 9:46 pm

A common approach is to use invisible solid sprites as barriers at the edge of where you want the player to be able to move.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun Jul 24, 2011 10:02 pm

No way to turn that around, like placing invisible object on which the player can move?

Thanks for your help anyway :)
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Sun Jul 24, 2011 10:16 pm

No, solid things are just solid. There's no anti-solid.Ashley2011-07-24 22:16:21
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Next

Return to Construct 2 General

Who is online

Users browsing this forum: WhosWho and 5 guests