Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Flip tween animation

Author
Message
Daitallica
13
Years of Service
User Offline
Joined: 20th Mar 2011
Location:
Posted: 24th Oct 2017 13:17
Hi guys n gals

I'm trying to make a bar that starts off at 2px then scales up to 88px then back down to 2
Ive got it to do this however the tween starts at the top of the sprite I assume at 0,2? down to the bottom of the sprite 0,88?
I would really like the tween to start at the bottom of the sprite 0,88? then tween up to 0,2? if this is possible

Essentially I just want the tween flipped so to speak.

Thank you
Daitallica
13
Years of Service
User Offline
Joined: 20th Mar 2011
Location:
Posted: 24th Oct 2017 16:23
I have tried SetTweenSpriteYByOffset, which with my settings makes the tween go from the middle out, so its half way there I suppose haha

Ooh also I would like to know how to reset the animation/set it back to initial frame after clicking a button,
at the moment the animation just stops wherever it is paused and starts from where it left off

The bars are for an old style graphic equaliser, the kind that bounces from audio volumes and the like

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 24th Oct 2017 21:28 Edited at: 24th Oct 2017 21:30
I have found the same as you have, that the offset determines the sprite behaviour.
You need to set the X and Y to the relevant point to make it behave as you want.
This means you may have to refactor some other code to compensate for the offset.

I have also discovered that you may need to manually set alpha and sizes before the tween starts. This is especially true if you have a delay. Otherwise, a sprite can be visible, then it disappears as the alpha fade starts and comes back to 100% opaque again.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Daitallica
13
Years of Service
User Offline
Joined: 20th Mar 2011
Location:
Posted: 24th Oct 2017 21:46
Thanks,I keep all my settings outside of the main loop and call them when needed.
I will keep playing with the offset and hopefully I will come up with something.

I'm surprised that using negative values don't work, that seems the intuitive thing to do,
well for me at least.

Thanks again
Daitallica
13
Years of Service
User Offline
Joined: 20th Mar 2011
Location:
Posted: 24th Oct 2017 22:55
Ok I've managed to get the effect I want by doing this :



I'm going to try SetTweenSpriteY (vduTween,196,196,-1) to reset the animation from a button

Login to post a reply

Server time is: 2024-11-24 08:27:12
Your offset time is: 2024-11-24 08:27:12