Falling Through Holes

Get help using Construct 2

Post » Thu Jul 04, 2013 8:18 pm

I am trying to create a game where the BALL (player) must find their way to a hole, but I can't figure out how to make the ball disappear when the roll over the hole.

Also, do I need an animation for this effect or can i just add the "fade" behavior to the ball.

Thank you for any help.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Thu Jul 04, 2013 8:26 pm

You can use the Fade behavior or you can simply use the "Set Visible" action.

Every object that can be displayed on the screen will have this action available to it.
B
12
S
4
G
2
Posts: 59
Reputation: 3,779

Post » Thu Jul 04, 2013 8:27 pm

You need to add an event like - 'ball on collision with hole' then actions like 'fade: start fade' :)
B
4
S
1
Posts: 51
Reputation: 502

Post » Thu Jul 04, 2013 8:32 pm

You can also specify an area of collision 'like bottom of the hole, also you can fade it or start an animation,'on collision. or both :)

post your capx file so someone can show you directly.GeneratorX2013-07-04 20:33:42
B
4
S
1
Posts: 51
Reputation: 502

Post » Thu Jul 04, 2013 10:06 pm

also: blend mode
B
18
S
5
G
4
Posts: 568
Reputation: 5,079

Post » Fri Jul 05, 2013 5:31 am

R2
Last edited by CarHazy on Sun Jun 14, 2015 3:11 am, edited 1 time in total.
B
20
S
7
G
5
Posts: 24
Reputation: 4,495

Post » Fri Jul 05, 2013 3:43 pm

Thanks for the replies,
I forgot 1 important point, it's a topdown game. I did get the ball to disappear, but it does so rather quickly. I have messed around with fade out times but get the same result.

Again, thanks for the help.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Fri Jul 05, 2013 3:49 pm

Just set an event as..

Ball | On collision with hole ; Set opacity to lerp(Ball.Opacity,0,#number#*dt)

Here you go !
B
38
S
16
G
17
Posts: 2,230
Reputation: 17,220

Post » Fri Jul 05, 2013 5:46 pm

You may also use the same lerp numbers to scale the ball down as it fades, that way it simulates moving away from you as it enters the hole, disappearing in the darkness.
B
215
S
57
G
32
Posts: 900
Reputation: 38,789

Post » Fri Jul 05, 2013 6:14 pm

Thanks, again.
Is it possible to have a reverse lerp? As if the gold ball (player) falls down the hole the hole will spit it back out, say after 1 sec?
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Next

Return to How do I....?

Who is online

Users browsing this forum: Kyatric, oddreal, oosyrag, waguilar and 4 guests