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 / Getting a TweenCustom value from a TweenChain

Author
Message
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 8th Sep 2017 07:35
Tier 1, AppGameKit 2017.9.4

I've been trying to extract a float value from some custom tweens added to a tweenchain using GetTweenCustomFloat1, GetTweenCustomFloat2 etc with no luck.

I can fake the desired behaviour using tween sprites but are custom tweens working in tween chains?




Problem 2: CreateTweenCustom doesn't work if its duration is set to 0. SetTweenDuration later in the code does nothing; minor but annoying to track down.

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 11th Sep 2017 13:05
Unfortunately you cannot use the tween chain ID to access the values from a custom tween, you must use the original custom tween IDs to access the custom values.

Quote: "Problem 2: CreateTweenCustom doesn't work if its duration is set to 0."

Using a duration value of 0 will generate an error, since the tween will never do anything. Using SetErrorMode(2) will display errors.
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 11th Sep 2017 15:03 Edited at: 11th Sep 2017 15:05
Righto.

On the second point, the tween will do something if it's later set to a duration longer than 0 using the setTweenDuration(id, duration#) command surely? Doesn't really matter as I can initialise them to 1.0 first but it did cause non-functioning tweens until I figured out the reason.

Login to post a reply

Server time is: 2024-11-24 07:18:11
Your offset time is: 2024-11-24 07:18:11