Transparet Solid

Get help using Construct 2

Post » Mon Oct 17, 2011 2:00 am

I attempted to make a transparent 9x27 sprite and set its behavior to solid. The character sprite still goes right through it. I even adjusted the layers setting the transparent sprite to layer 3 and the character sprite to layer 2 and vice versa. Neither worked.

Am I correct in assuming it is impossible to create a transparent solid object?

droptank212011-10-17 02:09:48
B
22
S
9
G
3
Posts: 203
Reputation: 3,647

Post » Mon Oct 17, 2011 2:17 am

My first thought is that the problem's with the collision polygon. If the original sprite itself is transparent, rather than edited in C2 to be transparent, it might set the collision polygon to nothing. Try looking at that and seeing if that's true.

Otherwise, you can always change the sprite's opacity within C2 instead of in an outside program.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Mon Oct 17, 2011 11:34 am

Tried both. The character still goes right through the object, even when at 10% opacity.

Attached capx
B
22
S
9
G
3
Posts: 203
Reputation: 3,647

Post » Mon Oct 17, 2011 12:11 pm

This is because your "hero" has no collision detection events or any behaviors that have collision detection built in.

I updated your capx to use the 8-Dir behavior instead, which collides with solids and has the same type of movement you were trying to achieve with events.

http://dl.dropbox.com/u/6660860/8dir.capx
B
7
S
2
G
4
Posts: 164
Reputation: 2,418

Post » Mon Oct 17, 2011 2:40 pm

The Solid behavior only automatically stops the Platform and 8-Direction behaviors. You'll need to make your own collision events if you're making an event-based movement.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Mon Oct 17, 2011 3:35 pm

Got it. Thank you all for your assistance. Without all of you and these forums I'd be totally lost or using 10X the necessary amount of events to do simple tasks.
B
22
S
9
G
3
Posts: 203
Reputation: 3,647


Return to How do I....?

Who is online

Users browsing this forum: GSquadron and 25 guests