Collisions During Fade Out

Discussion and feedback on Construct 2

Post » Sat Jun 11, 2016 4:15 am

Hey, folks-- what's the best way to prevent collisions during an object fade out (after a collision with it has occurred)?

I'm having an issue where a game's score is being increased multiple times when two collided objects stay in contact with each other during the fade out I have set on the object being destroyed...


Thanks!
Bryan
B
5
Posts: 5
Reputation: 235

Post » Sat Jun 11, 2016 4:22 am

I'm not sure if the fade-out behaviour directly links into the opacity of the object - but you can try doing a comparison with the opacity for your collision.

If opactity = 100
Object collides with object
--- Do stuff

If that doesn't work, you may be better off not using the fade behaviour, and coding a simple one yourself just be setting opacity of the object until it's at 0 - then destroying it if opacity is 0 or less.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Sat Jun 11, 2016 9:43 am

Hey @bcgreen24

I think the best way to do what you want is to disable the collision with the object that is going to destroy.
e.g.
object A on collision with object B ------ object B disable collisions , object B start fade

Cheers
B
36
S
15
G
1
Posts: 59
Reputation: 3,441

Post » Sat Jun 11, 2016 10:46 pm

Thanks, saour-- I'll give that a go...

Bryan
B
5
Posts: 5
Reputation: 235


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests