Sine Help

0 favourites
  • 6 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi,

    I want to have object A grow in size when object B touches it.If I do this with the sine behavior, it will grow and then decrease in size. I want it to remain at the new size.

    How can I achieve this?


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello,

    Check every tick or every seconds if the object's size has reached a value, then disable the Sine behavior and set the object's size by yourself if needed (using scale object property, or dimensions directly).

  • How would I check every tick if the objects size has reached a value? Every tick is an event and compare x and y is an event

  • Hi,

    the way that definitely works:

    set objBox sine wave active (e.g. when colliding)

    wait x seconds (x= half of the wave - if the wave would need 2 seconds set it to 1)

    set objBox sine wave inactive

    Should also work

    You could check the sine cycle position in an IF statement

  • Thanks. Would I do that through events? if so, which? fm4fanAT

  • here is the smallest version I can think of

    make on sprite object and give it the sine behaviour

    set the sine movement to size and period to 4, magnitude 50

    in events

    system > on start of layout | objSprite > set sine active

    | system > wait 1 second

    | objSprite > set sine inactive

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