playMaker

Author Topic: Tween Scale Issue - How to kill a tween  (Read 1175 times)

smackgames

  • Playmaker Newbie
  • *
  • Posts: 3
Tween Scale Issue - How to kill a tween
« on: January 11, 2021, 07:56:48 PM »
Hi,

I am coming from the Construct engine.  There you can start a tween and give it a tag.  Then in a later game loop you can kill the tweens with that tag mid-tween, or detect the tween finished event.  Godot also has a way to kill a tween based on its tag.

I can't find a way to interrupt a tween, I can only allow it to Finish and then fire an event.  I want to grow an object when the key is pressed down, but be able to interrupt it mid-flight and possibly reverse it.  I can't find any "Stop Tween" actions.  It would be great to be able to tag tweens and then kill tweens by tag, it is helpful in both engines I am familiar with, so am assuming it's possible.

At the moment because I cant set a tween running and interrupt it, I am constantly firing small linear tweens at 0.1s so it looks like the keyboard is controlling the tween accurately.

Also, I would like to fire a tween off asynchronously and move on, not be sat waiting for a tween to complete - for example I could just move onto the next state while the tween is running, waiting for a Key Up event.  At the moment I am having to just sit there waiting for the tween to finish.

Any help appreciated.

i
« Last Edit: January 11, 2021, 07:59:01 PM by smackgames »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Tween Scale Issue - How to kill a tween
« Reply #1 on: January 12, 2021, 11:25:09 AM »
Hi.
What Tween actions are you using?

smackgames

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Tween Scale Issue - How to kill a tween
« Reply #2 on: January 12, 2021, 12:42:40 PM »
Scale tween

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Tween Scale Issue - How to kill a tween
« Reply #3 on: January 13, 2021, 05:49:13 AM »
Hi.
You might want to look into using DOTween

You can find actions here :
https://hutonggames.com/playmakerforum/index.php?topic=10303.0

Download asset before adding actions.

smackgames

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Tween Scale Issue - How to kill a tween
« Reply #4 on: January 14, 2021, 06:09:25 PM »
Thanks.  Does it let you fire a tween a synchronously and leave the state while it is running?  If I have to let the state finish - it doesn’t help