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 / Can I update a single tween?

Author
Message
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 11th Mar 2015 23:02
Is it possible to update just a single tweensprite instead of all tweens at once? I'm currently using the standard:
Quote: "updatealltweens(getframetime())"


However I would like to be able to pause all the updates and only update one single tween (for an "Are you sure you want to quit" graphic). Can we selectively update tweens, or is it all or nothing?

Thanks.

V2 T1 (Mostly)
Uzmadesign
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 12th Mar 2015 00:53
UpdateAllTweens() will only update tweens that are playing, so any that have already reached their end point or are otherwise stopped won't play when you call it. As such, one way you could achieve this would be to iterate through all of the existing tweens and their accompanying sprites that aren't a part of the "Are you sure you want to quit" sequence via StopTweenSprite(tweenId, spriteId) [or the equiv. StopTweenXXXXX command for other elements such as text].

This still sounds like a good feature request to be able to update specific tweens more easily. In fact, the integrated tween commands could use a number of valuable enhancements in my opinion.
JohnnyMeek
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 12th Mar 2015 11:09
If you switch to the Tween library in the codebase rather than the built in AppGameKit version, you can update tweens by ID.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 12th Mar 2015 11:20
Thanks xCept and JohnnyMeek. I don't want to stop the tweens, just pause them, so don't think using StopTweenxxxx is the way to go. I'll take a look at the Tween Library after I get this project out the door (it's very nearly ready to publish and I don't fancy a big re-write at this stage).

Hopefully TGC will get more resource to the AppGameKit development for little improvements such as this, leaving Paul free to deal with the big stuff. I keep buying the odd TGC product every now and then in the hope that I am helping achieve this dream!

V2 T1 (Mostly)
Uzmadesign

Login to post a reply

Server time is: 2024-11-25 18:56:00
Your offset time is: 2024-11-25 18:56:00