Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(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.