Enhance the Sine Behavior

0 favourites
  • 4 posts
From the Asset Store
"Easy Local Notifications" enhances games with customizable local notifications.
  • Hi all, using the Sine behavior is really handy for making objects opaque, move or rotate smoothly. Two features I think are missing are setting the reference line, and setting/resetting the moment in the cycle.

    Right now, the reference line is in the middle - and this causes a problem. In my game menu, I show all my levels that will be available, but only one is available now. What I want to happen is when someone clicks on a level not available, I want to show them that it's under construction. I want to use the Sine behavior to move the level icon/image down that reveals a "under construction" image. But using the Sine behavior as is causes the image to also move up above its normal position. The Sine behavior has to complete the cycle before being able to move down again.

    Can the Sine behavior be enhanced to include the ability to set the reference line (top/middle/bottom, or 1/0.5/0), and/or being able to set/reset the cycle (start/middle/end, or 0/0.5/1)? See embedded image:

    [attachment=0:a6w13lj2][/attachment:a6w13lj2]

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You could use the Period Offset to set its initial position on another part of the sine "wave". That's how I do it anyway

  • +1

    I think that if the sine behavior had some conditions that compared the progress, it would add a lot to it's functionality

    In the meantime, perhaps the LiteTween and/or the EaseTween behaviors might prove even more useful for the thing that you want to do.

    https://www.scirra.com/forum/behavior-litetween_t70700?&hilit=EaseTween

  • Thanks for the replies! I'll try out your suggestions today.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)