How do I pause a sine behavior after each full motion?

Get help using Construct 2

Post » Sat Nov 29, 2014 11:42 am

I want a camera to rotate from side to side, over and over again. The sine behavior works great for that, but what it doesn't allow me to easily do (as far as I know) is to add a pause at each end of the motion. So when it gets to the farthest position on the left side, it pauses for let's say 0.25 seconds, before it starts moving again. The same happens on the farthest right position. How would I do this?
B
10
S
2
G
1
Posts: 49
Reputation: 693

Post » Sat Nov 29, 2014 1:44 pm

If Ashley did not change it, you can't set the cycle position of the behavior, so controlling the behavior is tedious and sometimes impossible.
I'd suggest instead of using the behavior to just code the sine movement yourself.

Nevermind, seems like there is now a set cycle position action. So just check for the cycle position and deactivate it, when it reached half or zero again. After your pause you can activate it again and set the cycle position to exactly 0.5 respectively 0. Still probably would be easier to just code it without the behavior.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Sun Nov 30, 2014 10:08 pm

Thanks, I'll try juryrigging something then.
B
10
S
2
G
1
Posts: 49
Reputation: 693

Post » Mon Dec 01, 2014 1:59 pm

I found the behavior Lite Tween, which works using a modified sine behavior and should allow me to do what I want. It descerns between a Sine Up and Sine Down behavior, so it looks like I could simply set up a wait in between those two behaviors triggering.
B
10
S
2
G
1
Posts: 49
Reputation: 693

Post » Mon Dec 01, 2014 6:03 pm

just want to show that it is not hard to implement something like this yourself without a plugin:
Image
(there are probably even simpler ways to implement it)

(saving start time and substracting it from the game time could be more exact for keeping track of the period, I know)
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Tue Dec 02, 2014 9:05 am

Yeah, doesn't look that hard. The LiteTween behavior is very versatile for a lot of things I want, so I'm sticking to it.
B
10
S
2
G
1
Posts: 49
Reputation: 693


Return to How do I....?

Who is online

Users browsing this forum: ivanski1983, marcoscodas, Yahoo [Bot] and 13 guests