Deprecated! Tweening plugin for the c3runtime + tween timeline support.
Everything you need to know :) Requires tWeeen version 1.0.2.0
Hmm, hard to tell what could be the problem.
Do other tweens (e.g. position/rotation) work?
Is the tween simply not running or does it also freeze the app?
Any log outputs?
Thank you for that, very useful!
Can you get this to work for r120?
It does work unless some error creeped in with the new update that I´m not aware of. It only does not work prior to r113. I guess I can remove that info anyway since nobody will use r112 or less anymore :)
I was about to ask if you intended to allow us to tween colors, but it seems you were quicker. I can just do it with instance variables with the new version, I can even tween effects.
This is great! What motivates you in making this?
¯\_(ツ)_/¯ I´d say there was a need for it and I felt the urge to do it. And while at it I could hone my javascript skills a bit. Win-win.
Yea, i know, its deprecated, but i'm use it on my large project:
The Problem is, currently don't work with the latest beta."Error: Addon 'wackytoasterTweeen' ACE 'initializeTimeline' uses "variadic" parameter which is not supported in the SDK."
Can you fix this? That would be very useful for me.
Alright, I´ve updated the addon. Make sure you read the release notes for how to update since this is a breaking change!
construct.net/en/make-games/addons/163/tweeen/1-0-3-0-372
Let me know if it works out. Cheers!
thanks ^^
Thank you :)
Is it possible for you to stay at the last version it did work?
Either way, the addon only uses variadic in the initializeTimeline action. If you don´t use that feature it would be rather easy to just remove it. Else I think it isn´t too hard to change it either, but I don´t know how it will behave in terms of compatibility... you might have to remove all initializeTimeline from your project temporarely, update the addon, then add them back again.
Ashley: If I deprecate the action with the variadic, will construct still refuse to load it?
WackyToaster
I have an error while exporting, it freezes the game. I tried on latest stable and beta construct versions with different settings, with nws.js export and html5 export. It doesn't happen when just testing the project in the editor, but only during the loading of an export. Whether I use one of the default loading screens or a custom one, it happens just after reaching 100% loading.
As it also happens in the stable version (before construct added their own tween), I suppose it comes from your plugin.
An image with the error:
imgur.com/a/DO3lkAW
While I'm at it I'll continue to use your plugin in the future as it's more flexible and more complete than the official one (even if you have a bit less easing functions).
Can you post the project? Preferably stripped of the unneeded stuff so I can investigate that.
Hey,
Thanks for the plugin. It's great!
Just one thing. I'm trying to dynamically change a value (angle & duration) for a random spin of an object.
I've tried initializing and using the random(xxx,xxxx) and also using a variable that gets set like that too.
My problem is that after the first initialization, the values seem to be hardcoded and just keeps repeating that first value each time.
I may be just being stupid :D
I worked it out - I didn't realise you had to re-initialize each time.
I now have a problem where I can't get the opacity to tween correctly. I initialize and then set the target to 80%.
Everytime I call the Tween, it goes straight to 100% and ignores duration/target value etc.
Any ideas>?
Yes, you have to re-initialize it each time. The idea is that you only have to initialize it once and can re-use it everytime. But of course if you need to change the values you have to re-initialize it with the new values.
Regarding opacity: The target is between 0 and 1, not 0 and 100, that is likely the reason why it appears to jump. But since it isn´t really mentioned anywhere, I´ll make sure to add that info in the next release!
If that doesn´t solve it I´d request you share the code so I can take a look.
Here was a comment about an error, but I'll replace it by a conclusion after a big debugging session:
I didn't know it, but you can't launch timelines or tweens on several instances at the same time (around less than 0.1-second difference. Might be a bug.
It's a bit annoying for "is on floor" from the platform behavior when everyone spaws at the same time for example but understandable.
I just hope it's going to be fixed soon because it causes me problems when players are jumping.
Hey, I´m not 100% sure if I understand everything correct (based on your image) but from what I tested it appears to work. One thing that did cause trouble is the platform behavior interfering with the tween bahvior (most likely because it has a permanent gravity acting on it) so as long as the tween is running, the platform behavior should be disabled. If that doesn´t solve it I´d request an example file showcasing the bug.
EDIT: If you don´t want to disable it completely (so the player can still move left/right) you can also set the gravity to 0.
wackytoaster.at/parachute/tweeen_platformer.c3p
Exemple capx:
drive.google.com/file/d/1PSKsmmRyLf4RJxKSo-ucIyQx9O678GNS/view
Ok, didn't fix, I'm going to send an example capx soon
ok
I am glad you answered but from what I tested the problem is not here.
I checked before and the platform behavior and tweeen were working perfectly fine together (mainly because I didn't change the coordinates when not on the floor) when I tested with one player, but as soon as I land or jump at the same time with several players it crashes.
I'm going to try the c3p you sent.
EDIT: your c3p was a good source of inspiration, thanks, I'll try to disable the platform behavior for the jumping and falling animation but I'm afraid that it will affect gameplay.
RE-DIT: While I'm at it, the error was: Uncaught (in promise) TypeError: Cannot read property 'val' of undefined, which doesn't seem to be linked to the platform behavior
The code in question:
imgur.com/a/WgkViCm
I can't seem to get it to work within my project after installing the addon through the addon manager. It doesn't seem to appear in behaviors. Any tips on installing?
It only works with the new runtime, you have to switch to the new runtime in the project properties.
Silly me. Thank you!