How do I Mirror Image while using Sine behavior?

Get help using Construct 2

Post » Tue Jun 17, 2014 1:33 pm

Hi!

Is there anyway to mirror an image while using sine behavior?
I have set forward/backwards movement for an enemy. But I would like to make it turn around every round.

I thought aout using events... but I bet there is a better way!

Thanks!
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Sun Aug 10, 2014 4:30 pm

id like to know this too :)
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Post » Mon Aug 11, 2014 3:26 pm

How would there be better way than events?
Code: Select all
Compare two values:
Sprite.Sine.CyclePosition < 0.25
or
Sprite.Sine.CyclePosition > 0.75
 = Sprite not mirrored
Else
Mirrored
B
34
S
9
G
3
Posts: 517
Reputation: 5,226

Post » Sat Sep 19, 2015 11:37 pm

This is exactly what I want to do, but can't figure this out. Anybody have CAPX file that demonstrates? or can show a screen capture of how the events should look?
Play Ball Walker App Store | Google Play | Amazon
Image
B
30
S
5
Posts: 116
Reputation: 2,088

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
Image
B
30
S
5
Posts: 116
Reputation: 2,088


Return to How do I....?

Who is online

Users browsing this forum: Wartexnik and 11 guests