How do I reset a sine movement (plugin)

Get help using Construct 2

Post » Mon Apr 21, 2014 7:47 pm

I want my character to stick to the ceiling and then bob up and down as if dangling from a rubber band.

I got this to work by making a sine movement active after sticking to the ceiling, and then making it inactive after unsticking.

But I want the character to start the sin movement at the same point on the wave each time he sticks to a ceiling, so I can control the animation. Now, if you begin by moving up and unstick while in the middle of moving down, you will start the second stick by moving down first.
B
5
Posts: 17
Reputation: 259

Post » Mon Apr 21, 2014 7:59 pm

Okay, I got it to work.

I didn't make it swap between active/inactive. It's active all the time. When you are not stuck to the ceiling, period and mag is at 0. When you are stuck to the ceiling, period and mag is at 2.
B
5
Posts: 17
Reputation: 259

Post » Mon Apr 21, 2014 9:17 pm

You could also reset the period after you reactivate the behavior ,
Set period
Set the duration of a single complete back-and-forth cycle, in seconds.
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499


Return to How do I....?

Who is online

Users browsing this forum: jaytrott86 and 8 guests