TweenGMS 2 Beta 10


Beta 10 for TweenGMS 2 is now available! 
(Technically, I've skipped over "Beta 9", but don't worry about that!)

It is my aim for this to be the final beta before a stable release. After some documentation improvements, I'd also like to throw this beta onto the GameMaker Marketplace. Please let me know ASAP if you come across any issues.

Please be aware that there have been changes made to how callback targets are handled. You should mainly only notice a difference if you have used methods for callbacks. Previously, methods were not being assigned explicit targets. But now they are! So please make appropriate changes if this affects your existing code. Make sure intended instance/struct environments are being used for method callbacks. (Note: passing the undefined keyword as a callback target will maintain a method's original instance/struct environment)

Also note a couple more potentially code-breaking changes:
- Changed TweenGetDefault() and TweenSetDefault() to TweenDefaultGet() and TweenDefaultSet()
- Changed naming for legacy global "health" and "score" to "health!" and "score!"

The link below is an update log for beta 10 (and beta 9):
Beta 10 Update Log

Files

TweenGMS 2 - Beta 10 [GMS 2.3.7] 104 kB
Dec 28, 2021

Get TweenGMS

Comments

Log in with itch.io to leave a comment.

Hi, I have just tried to update to beta 10 in a project where beta 8 works fine and I get this error:

global variable name 'TGMS' index (100020) not set before reading it.
 at gml_Script_TweenEasyScale (line 75) - __TweenEasyScale = TweenFire(id, ease, mode, global.TGMS.EasyUseDelta, delay, duration, "image_xscale", x1, x2, "image_yscale", y1, y2);
############################################################################################
gml_Script_TweenEasyScale (line 75)
gml_Script_Create_Bounce (line 88)
gml_Object_obj_Start_Create_0 (line 1) - Create_Bounce();

The  Create_Bounce() script is triggered in the Create Event of an object:

/// @func Create_Bounce()
function Create_Bounce()
{
    var _in_xscale = image_xscale;
    var _in_yscale = image_yscale;
    script_execute(TweenEasyScale, 0, 0, _in_xscale, _in_yscale, 0, 90, EaseOutElastic);
}

If I revert back to beta 8 it works again.

GMS 2.3.7.606 runtime 2.3.7.436

(4 edits)

Thanks for reporting this!
This error only seems to happen when calling an Easy Tween at the VERY START of the game.

You can get around this by delaying the call by one step, or you could modify TweenEasyScale (and other easy scripts). You would need to change:

if (!instance_exists(o_SharedTweener)) SharedTweener();
to :
SharedTweener();

I'll aim to include this change in the next beta release. I'm aiming for one this weekend. -Stephen

Great, thank you!

In case you didn't get messaged about the update, the latest TweenGMS 2 beta (11) should fix the issue you mentioned above. Let me know if any trouble persists. :)

(+1)

Thank you for the reminder!
I have just checked beta 11 and it works fine.
Great workk!!!

-Alberto