Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › Sprite::running property bindings

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6982

    Heini

    Hi,

     

    I have a SpritesequenceFromFile with several Sprites inside. I would like to stop the spriteanimation when its movement is stopping. Therefore I set its running property to the movement.running property:

    Sprite{
    ......
    running: movement.running
    ....
    }

    Why does this not work, while setting Sprite.running manually works (what is a little unhandily in my case)?

     

    Cheers,
    Heini

    #6995

    Christian
    Felgo Team

    Hi Guybrush,

    try modifying the property running from SpriteSequenceFromFile instead of Sprite itself. The property of the Sprite element should not be modified, as documented in the sources:

    internal - must not be modified externally by engine users, gets set with jumpTo and goalSprite - it gets modified by changing the running property of SpriteSequence!
        Defaults to false, so animation is not started until this gets set to true. This should not be used by engine users directly, because a Sprite always must be nested into a SpriteSequence and running is only allowed to be set there.

    Using the something like the following code, your problem can be solved:

    SpriteSequenceFromFile {
          ...
    
          Sprite {
            .....
    
          }
          running: movement.running
        }

     

    Cheers,

    Chrisu

     

    #7001

    Heini

    Hey Chrisu,

    you´re right, setting Spritesequence.running works! I didn´try that, because depending from the sprite, i have to handle it on a different way.

    Thanks for the hint!

     

    Greets

    Heini

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded