Doubts about Opacity, Fading and Panoramics.

Get help using Construct 2

Post » Thu Nov 10, 2011 11:45 am

Ive some questions I hope somebody can help me with them :)

1.
Is it possible to define the Opacity of a layer with a slow fade in/out effect?

Example. Before starting the game, the screens pitch-black and then slowly goes away until it reaches 0% opacity.


2.
Is it possible to do a Panoramic (pan)? If so how do we control the velocity/speed of the pan?

Example. Before the game starts, the screen (like camera effect) is set on the end of the level and then is shows the all level so the player can see what to expect.

Thanks a million :)
B
18
S
4
G
5
Posts: 149
Reputation: 4,498

Post » Thu Nov 10, 2011 1:25 pm

You can check out the capx of my C2 comp entry there are some examples of fadein/fadeout implementation.
If someone feels like making a simpler capx only for this, go ahead, this might end useful.

For your question about the pan a bit of the answer is there.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Thu Nov 10, 2011 1:31 pm

Thanks Kyatric, you're a saviour :D
B
18
S
4
G
5
Posts: 149
Reputation: 4,498

Post » Thu Nov 10, 2011 1:47 pm

as for the pan, i implemented something like that into a demo
its really cool way of showing level like you said
demo

its implemented like this (where scrollstart is a sprite)
scrollstart.X < 2000 | scrollstart.X+8 + set globalvar scroll=1

system globalvar scroll=1 |

system scroll to
lerp(scrollx, scrollstart.X, 1*dt)
lerp(scrolly, scrollstart.Y, 1*dt)

after that you can set globalvar scroll to 0 and scroll to player instead
vtrix2011-11-10 13:50:48
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Thu Nov 10, 2011 2:40 pm

Vtrix, that's what I imagining :)
Thank you a lot =)
B
18
S
4
G
5
Posts: 149
Reputation: 4,498

Post » Thu Nov 10, 2011 5:52 pm

vtrix, but if the player has the behavior "scroll to" it won't to, right?
B
18
S
4
G
5
Posts: 149
Reputation: 4,498

Post » Thu Nov 10, 2011 6:11 pm

@Kyatric
I'm sorry, but in all that complex code you created for space jinx I really couldn't figure where's the fade out or how to do it.

Can you explain in "noob language"?

thanks
B
18
S
4
G
5
Posts: 149
Reputation: 4,498

Post » Thu Nov 10, 2011 6:21 pm

I'm aware it is complex, but take the time to read the comments, I explained the logic.

In the event sheet "StoryIntroSheet" you have a group sFadeOut, in "LevelGeneralSheet" you have the groups FadeIn and FadeOut.
They are commented.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Thu Nov 10, 2011 6:22 pm

yeps :)

I've seen them now, gonna read. Thanks.
B
18
S
4
G
5
Posts: 149
Reputation: 4,498


Return to How do I....?

Who is online

Users browsing this forum: CavalierBubble, Evanetot and 25 guests