Dissolve (two questions)

Get help using Construct 2

Post » Sun Aug 19, 2012 11:42 am

I have two images, and want to dissolve one to the other.

Currenty I have one on top of the other in different layers and use the fade out behavior on the top image, but this is only temporary.

1) Is there any built in dissolve effect, either between two frames of a sprite, or between two sprites?

In the game, there are 10 possible images underneath to desolve to, but the top image (dessolve from) is always the same.

The deslove can be quite blocky, and doesnt need to be random.

2) The other problem is that if the player clicks to end the game, I need to be able to stop any desolves currently in progress (or at least find a way to wait for them), and reset them all to the top image. This is currently failing with the fade out behavior, as if its still fading out when they end the game, I reset the opacity of the top image back to 100, but as its in mid-fade, it screws up.

Any ideas?

Many thanks!nutmix2012-08-19 11:46:48
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Mon Aug 20, 2012 12:12 am

B
79
S
24
G
54
Posts: 4,743
Reputation: 40,749

Post » Mon Aug 20, 2012 12:48 am

Havent quite figured out how it works, but the result is prefect.

+1000 credits to R0J0hound!
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Sun Dec 21, 2014 11:12 pm

R0J0hound would you be able to comment that example?
B
7
S
1
Posts: 18
Reputation: 405

Post » Sun Dec 21, 2014 11:54 pm

@indiegrimes

event 1:
every time the number of pixel objects is 0, have the two images swap layers and...
event 2:
Do a loop to cover the objects with pixel sprites. They are sent to back so the overall order looks like this:
Code: Select all
      +--- s1 sprite: blend: source in
      |
      +--- pixel sprites
   ___|______
  /   |     /
 / layer 1 /--- force own texture: yes
/_________/
      |
      +--- s2 sprite: blend: normal
   ___|______
  /   |     /
 / layer 0 /
/_________/


Events 3 and 4
set the blend mode for the image sprites depending on what layer they're on.

event 5
Destroys the pixels one at a time. The repeat is so it goes faster than 1 pixel per frame. The equations should simply be SPEED*60*dt where SPEED is in pixels per second.
B
79
S
24
G
54
Posts: 4,743
Reputation: 40,749


Return to How do I....?

Who is online

Users browsing this forum: WhosWho and 16 guests