Triggering collisions only on certain frames

Get help using Construct 2

Post » Sun Jul 12, 2015 10:39 pm

Hello

I have a couple of compound physics characters in my game. I want to trigger collisions only on or between certain frames of animation. I know the simplest approach would be to have collisions disable and when the animation hit certain frames enable then disable it. Are there any problems with this approach?

Another solution I thought of was instead spawning a dedicated collision object and pinning it when the character reaches reaches a certain frame.

Any advantages to rather approach? And other ways oh handling it?

Thanks!!
B
52
S
13
G
7
Posts: 147
Reputation: 6,800

Post » Sun Jul 12, 2015 10:52 pm

You can try:

1.sprite is on collison with ...
1.(AND) System is between value sprite.currentframe / low number of your frame / high

or

1.sprite is on collision with....
1.(AND) System compare 2 values sprite.currentframe = "number of your frame"
Image Image
B
25
S
14
G
138
Posts: 876
Reputation: 72,010

Post » Mon Jul 13, 2015 12:20 pm

Ah, good call! I'll give that a try as well. Thanks!
B
52
S
13
G
7
Posts: 147
Reputation: 6,800


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests