Forums

OverviewV-Play 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
    V-Play 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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support