Resetting/restarting a FlxTween

23 views
Skip to first unread message

Keith Weatherby II

unread,
Apr 19, 2015, 2:24:56 PM4/19/15
to haxef...@googlegroups.com
Is there a way to reset a tween?  There's a match-3 aspect to my game, where a block checks the space below it to see if it can move there, I use the tween to move it there, and then when "complete" is called I set it up to do it again by setting a flag.  Only problem is once it's completed once, it continues to call the "complete" function which means I'm never able to reset my flag.

So basically I want to reset it, so that it's like it hasn't finished yet.  Basically i want the blocks to fall to the next space, then if they're not at the bottom fall again to the next one, and so on until they can no longer do that.

Is there any way to make sure the tween resets?

Thanks.

Edit: Figured this out.  Didn't realize but the tween needs only to be started, so I was essentially starting a tween each update.  So I fixed the code to where it only starts it once, but then restarts it when it done.

I still get some sort of strange internal debugger error from time-to-time -- not really sure where.
Reply all
Reply to author
Forward
0 new messages