- Home /
iTween Parenting oncomplete issue
Hello. iTween is behaving strangely. I have a game object A and it has a child B. Both of them have tweens attached to them. When they are both tweening, only object A's oncomplete function is called and not B's. If i dont call the iTween on A, then B's oncomplete function is called successfully.
iTween seemss to behave erradically when there are multiple tweens being called at once.
Answer by Next Beat Games · Jan 07, 2013 at 01:21 AM
Woah. Just after posting this I gave debugging another shot. I had the orders in which they were called backwards and so I thought to put them in proper order and voila!
Previous: start iTween on B; start iTween on A; -> only A's oncomplete got called.
Changed to: start iTween on A; start iTween on B; -> both A & B's oncomplete get fired
Weird!!!!!! :(
Answer by jogo13 · Jan 07, 2013 at 01:20 AM
You might have to set the "onCompleteTarget" for each: http://pixelplacement.com/2011/02/21/understanding-itween-callbacks/
thanks for this. But yes im aware of that common error people have when trying to use itween callbacks. this issue, im afraid, is more complicated
Your answer
Follow this Question
Related Questions
iTween callback functions not firing 1 Answer
How to Grab an Object or Enemy 0 Answers
Simulate 'Child' Effect by Script 2 Answers
How to make multiple gameobjects child of one and the same transform (SCRIPT) 2 Answers
iTween: oncomplete triggers on all components that define $oncomplete function name 0 Answers