Transparency when overlapping?

For questions about using Classic.

Post » Wed Jan 11, 2012 7:24 pm

Hey there construct community. I'm trying to make it so that when a player enters a building the roof texture becames very transparent. How do I edit the opacity of a layer through expressions?
B
4
G
1
Posts: 50
Reputation: 652

Post » Wed Jan 11, 2012 9:34 pm

You use the function:
System > Layers > Set opacity. Then enter the name or number and in your case, 0 for transparent.
B
14
S
2
G
1
Posts: 28
Reputation: 1,152

Post » Thu Jan 12, 2012 3:18 am

@Siron, but doing this would cause the entire layer to become transparent...

It would be helpful to use the System event for "is overlapping" and set:

>Event: when the "roof" sprite and the "character" sprite are overlapping
>Action: "roof" sprite Opacity=30

...this way, only your roof is effected.
B
17
S
3
G
4
Posts: 91
Reputation: 3,929

Post » Thu Jan 12, 2012 5:26 pm

@ the_chosen_byte
I meant if he used layers like
1-HUD
2-Roofs
3-Level

He could make an entire Layer (only the roofs) invinsible.

He said Layers in his text, but maybe meant sprites siron2012-01-12 17:27:46
B
14
S
2
G
1
Posts: 28
Reputation: 1,152

Post » Sat Jan 14, 2012 6:10 pm

Thanks siron and the_chosen_byte.
B
4
G
1
Posts: 50
Reputation: 652


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest