Sine + Negative Width

0 favourites
  • 3 posts
  • Hi,

    When dynamically assigning a negative width/height to an object with the sine behaviour, followed by activated the sine, the negative value resets to the default width/height.

    <img src="http://i.imgur.com/vMBIH.jpg" border="0">

    CAPX

    Thanks!

  • I'm not sure this counts as a bug: the Sine behavior uses the size of the object set in the layout which is positive 128. So it initialises like this:

    Create Arrow size 128x128

    Initialise Sine behavior, width = 128

    Start of layout: set width -128

    After 1 second: activate Sine behavior using saved width of 128

    I could change it so activating the Sine behavior uses the value at the time of activation, but I feel it's likely this could break existing projects that deactivate and reactivate to "pause" the behavior. So closing as won't fix for now - easy workaround is to set a negative width in the layout view instead of setting on start of layout. Let me know if there's anything else you think should be done about this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the detailed reply - it makes sense why it's not a good idea to fix. As some context this was being used in dynamically created GUI (like pause screens and end of level screens) to create a 'continue arrow' and a 'back arrow'. Hence the flipping.

    I can simply use a new sprite or recreate the Sine behaviour. Thanks!

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