Mirroring object at end of sine wave

Get help using Construct 2

Post » Sun Jan 29, 2012 1:47 pm

I'm using the sine wave behaviour to move an object (a small airplane) back and forth. I want to mirror/unmirror the object at each end of the wave, so it's not "moving backwards" half the time.

Is there any way to do this, or somehow obtain a similar effect?


Thanks!
Ras
B
5
Posts: 12
Reputation: 774

Post » Sun Jan 29, 2012 1:57 pm

Perhaps use the bullet behaviour instead and have your sprite spawn a mirror image sprite at a certain x co-ord, then destroy the original sprite. Repeat.
B
31
S
11
G
7
Posts: 197
Reputation: 6,682

Post » Sun Jan 29, 2012 2:23 pm

That does seem to work - gives me the effect i want :) Thanks for the idea!
B
5
Posts: 12
Reputation: 774

Post » Sun Sep 20, 2015 11:33 pm

The capx file by @A0Nasser found in this thread has a perfect example.
how-do-i-move-enemies-like-in-mario_t119088?&hilit=sine+mirror&start=10

Works for me!
Play Ball Walker App Store | Google Play | Amazon | HTML5

Image
B
21
S
4
Posts: 93
Reputation: 1,360


Return to How do I....?

Who is online

Users browsing this forum: Kagubro and 21 guests