@StayAtHomeDev The tween_interval doesn't work because you set the set_parallel to true. That causes the interval to run parallel to the tween_properties (thus kind of negating it's use). One way to prevent this is to use chains: ``` var tween: Tween = get_tree().create_tween() tween.set_parallel(parallel) tween.tween_interval(delay) var chain: Tween = tween.chain() for property in properties: chain.tween_property(...) ``` Edit: Just now noted that @prateekmalhotra8552 also mentioned the same 🙂.
Then here's me who created a coin spawning animation that spawns several coins, moves them outward in a circle, and then zips them to wherever the money bag is at. I spawned instances of timers and awaited the finished signal from those to do my little wait between steps. XD Although to be fair, I was also playing sounds along with it so I wouldn't have been able to do the one line shown in the vid anyway.
This doesn't work if the node gets its properties modified after the initial setup by something external: for exemple if have my buttons with each an AnimationComponent in a vertical box container, and if I hide or show a child, then the vertical box container arranges its children but the values for AnimationComponent being stored as hard values at the begining makes it so that the buttons use the properties they add before that rearrangment.
I am not sure if this will work for your specific logic but have you tried chaining tweens? Something like this usually does the job for me: tweenojb.chain().tween_interval(1.0).chain() ...
You shouldn't even need the chain() as long as you do the interval before setting parallel to true. But I agree that it's simpler to just do it all within the Tween.
@@michelveerman I looked at this more closely because I have code that does this and it's very non-intuitive to me. If you do: tween_cmd_1 tween_cmd_2 set_parallel(true) tween_cmd_3 tween_cmd_4 Then cmd1 will run to completion, then 2, 3, & 4 run in parallel. I had interval in position 1, so it "worked". It seems more intuitive if 1 &2 ran serially, then 3 &4 ran in parallel, but that's not what was implemented.
@StayAtHomeDev The tween_interval doesn't work because you set the set_parallel to true. That causes the interval to run parallel to the tween_properties (thus kind of negating it's use).
One way to prevent this is to use chains:
```
var tween: Tween = get_tree().create_tween()
tween.set_parallel(parallel)
tween.tween_interval(delay)
var chain: Tween = tween.chain()
for property in properties:
chain.tween_property(...)
```
Edit: Just now noted that @prateekmalhotra8552 also mentioned the same 🙂.
Then here's me who created a coin spawning animation that spawns several coins, moves them outward in a circle, and then zips them to wherever the money bag is at.
I spawned instances of timers and awaited the finished signal from those to do my little wait between steps. XD Although to be fair, I was also playing sounds along with it so I wouldn't have been able to do the one line shown in the vid anyway.
This doesn't work if the node gets its properties modified after the initial setup by something external: for exemple if have my buttons with each an AnimationComponent in a vertical box container, and if I hide or show a child, then the vertical box container arranges its children but the values for AnimationComponent being stored as hard values at the begining makes it so that the buttons use the properties they add before that rearrangment.
I am not sure if this will work for your specific logic but have you tried chaining tweens?
Something like this usually does the job for me: tweenojb.chain().tween_interval(1.0).chain() ...
You shouldn't even need the chain() as long as you do the interval before setting parallel to true. But I agree that it's simpler to just do it all within the Tween.
@@MuffinMan_Ken No, that's not true. Setting the interval before set_parallel makes no difference. You really need chain.
@@michelveerman I looked at this more closely because I have code that does this and it's very non-intuitive to me. If you do:
tween_cmd_1
tween_cmd_2
set_parallel(true)
tween_cmd_3
tween_cmd_4
Then cmd1 will run to completion, then 2, 3, & 4 run in parallel. I had interval in position 1, so it "worked". It seems more intuitive if 1 &2 ran serially, then 3 &4 ran in parallel, but that's not what was implemented.
@@MuffinMan_Ken That's indeed quite strange, I understand the confusion. I guess it's still best to use chains, to make it more clear.