TweenGMS 2 Beta 4.1


This is a small update to the larger Beta 4 release. You can find the post for that update here.

This update fixes an issue where TweenEasy*() functions could cause a crash if called immediately at game start. Additional changes are below...

[4.1]
-Fixed issue where starting an easy tween at launch would cause crash
-Fixed TGMS_FetchTween() to properly return undefined/null tween ids
-Adjusted TGMS_FetchTween to prevent crash if o_SharedTweener doesn't exist yet
-Stopped adding "TGMS" layer to rooms

Get TweenGMS

Comments

Log in with itch.io to leave a comment.

(2 edits)

bug report (and workaround for it):

struct property tweening (such as TweenFire(apple, EaseLinear, 0, true, 0, 5.0, "x>", 50);) didn't work for me in this release until i made the following change to the function TGMS_Variable_Get in TGMS_7_Properties:

function TGMS_Variable_Get(target, variable, caller) {    
    if (!is_real(target) and !is_struct(target))
    {
        target = target.ref;    
    }

if anyone else if having this issue, make this change and it'll start working. the change is adding "and !is_struct(target)" to the if statement. this might not be a proper fix though so hopefully an update fixes the issue

Hey!

I'd like to confirm your example....

TweenFire(apple.x, EaseLinear, 0, true, 0, 5.0, "x>", 50)

The first argument [apple.x] should just be [apple]....

TweenFire(apple, EaseLinear, 0, true, 0, 5.0, "x>", 50)

Structs are quite a new thing, so expect there to still be issues. I appreciate this being brought up. I can check and verify these things later.

I am writing this from my phone, so sorry if this text comes out messy :)

oh my bad, i got confused with the syntax when i wrote that post, just was trying to think of an example. but here's what i had that wasn't working (where _element is a struct like { x: 0, y: 0 }):

TweenFire("-duration", _tween_duration, "-target", _element, "x>", _x, "y>", _y);

this doesn't work and gives me this error:

Variable <unknown_object>.ref(100420, -2147483648) not set before reading it.
 at gml_Script_TGMS_Variable_Get (line 624) -               target = target.ref;      
but if i make the change i described in my post, it works.
(+1)

Thanks! I might look into this more tonight.

Thanks for the help! 

I was able to clean things up which hopefully will make things more stable overall.

The latest blog post mentions a couple other additions to the update.