Opacity-Switch of 2 Overlapping Objects w/Same Blend Effect

Get help using Construct 2

Post » Thu Jul 24, 2014 4:24 am

CAPX: https://www.dropbox.com/s/6noe9vfhze9da ... 41zm5.capx

Summary: Two objects - HUDTimerLightGreen and Red - with the same characteristics but different colors are overlapping each other and a Spritefont object. One starts out with opacity 100 and the other 0. In accordance with the percentage of time remaining (variable Timer), the opacity inversely changes between the two objects. Both are set as "flashlights" (see the included Lighting capx example with C2) on the HUD with the Source In blend mode selected. The effect is to simulate a light shining behind the Spritefont object where the text is "cut out" and the light can be seen behind. As time counts down, the opacity of the red variant object increases while the green fades out.

Image
The image doesn't show the color effect I'm trying to describe, but is meant to display the backlit "cut out" effect I've set up.

Number one problem: Because of the blend effect as one overlaps the other, one of the objects basically is forced to be black (or invisible...I'm not sure WHAT is going on). After some time passes, the other object does become visible...but as you can (not) see, the timer via the SpriteFont object is basically blacked out. (Adjust the Timer variable value to a shorter time if necessary.)

I've examined the additional WebGL effects that you can apply to the objects, but I'm not yet sure if there is a viable alternative. Short of creating a frame-heavy animation altering the RBG value, I'm not sure how to remedy this.

Any suggestions, please? Thank you!
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
141
S
24
G
8
Posts: 790
Reputation: 15,119

Post » Thu Jul 24, 2014 3:24 pm

*bump*
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
141
S
24
G
8
Posts: 790
Reputation: 15,119


Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948 and 7 guests