How do I manually fade in?

Get help using Construct 2

Post » Wed Nov 12, 2014 10:12 pm

Hello, I'm trying to make a layer fade in over a period of 2 seconds. I have these events for it:
Image

This only runs through the every 0.02 seconds once and then finishes. I need it to run through it until the defined limit. How can I do this?
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Wed Nov 12, 2014 10:47 pm

....
You do not have the required permissions to view the files attached to this post.
Image
B
64
S
23
G
7
Posts: 1,483
Reputation: 10,827

Post » Wed Nov 12, 2014 11:05 pm

I have literally copied your method and it still doesn't work, here:
Image
the "Fade triggered" alert pops up, but then the opacity of the layer does not change.
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Wed Nov 12, 2014 11:08 pm

Timer needs to be a static variable. Also, timer logic shouldn't be a sub-event under "trigger once".
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,187

Post » Wed Nov 12, 2014 11:13 pm

@TiAm how then can I trigger the fade?
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Wed Nov 12, 2014 11:36 pm

Well, in this case your 'trigger' is the 'else' condition, which won't run until FLogo.Y < 175.

Just move "Timer < 100" to being a sub-event for the else condition, instead of a sub-event for 'trigger once'. You need that event to run 100 times to fade in. If it's a sub-event under 'trigger once' then...it'll only run once.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,187

Post » Wed Nov 12, 2014 11:41 pm

Thanks, this now works. I had somehow got it into my head that doing that would, every tick, set the value back to 0 because of the overall 'Every Tick' repeating.
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], lolsuperscratch, RobertMKD, tarek2 and 10 guests