Tween in a function

Of course! Dumb question! Thanks.

Sorry guys, you’re offtrack.
If the parameter name mattered, it wouldn’t be possible to change it. :slight_smile:

The only issue with your project is that you need to fully open the tween action to somehow bind the tween setting inside it. Yeah, as silly as that… Open it, close it.
I’ve banged my head on this before, I reported the issue, and it was fixed, but not entirely, it seems. Tagging @4ian as he was the one who fixed it.

1 Like

Oh yes, I see what you mean. That’s weird. Thanks for the tip!

Sorry to revive an old thread here, but I seem to be having the same problem and I’m not sure why even after reading through (and I’m not sure what you meant about needing to fully open the tween action if that rectifies the situation.)

This spawns the object but does nothing past that.

Oh jeez, my bad. Nevermind the above - after making the changes to the function I hadn’t changed the call to it in the scene. While it looks the same either way (since the second parameter doesn’t show as it’s a behavior) - just adding it again after making the function changes it works as expected. Sorry!

For me this issue still exists and neither restarting gdevelop nor renaming the tween-identifier helps.

Sorry, as new user i can not add pictures. here are links to my screenshots:
https://imgur.com/yxsKS73

https://imgur.com/hB4i7t3

In the exampe above I work with a newly created object but it does not make a difference if I access an already existing object or create a new one. it just does not work. :frowning:

This issue has been resolved.
Please open a help topic if you need help.
Objects cannot use tween actions unless they have the tween behavior. The object in your function doesn’t seem to have that behavior.