Simple tweens with waits? Unexpected results.

0 favourites
  • 6 posts
From the Asset Store
Calculate parabolic trajectories and tween objects over them.
  • I'm trying to simply move an object (an eye) to a position and then back again at random times however with the code below the eye movement speeds up and seemingly the Trigger_Eye_Movement function is getting run over and over again. I do not understand this as it should only get triggered once the tweeen (look centre from right) has finished..

    I thought I knew how the wait system worked but clearly something is going terribly wrong. It seems like this should be something very simple to do.

  • You don't need "Wait for previous action to complete" actions here, remove them. Other than that, I don't see any issues with your code. Could you share your project file?

  • I cant really share the project as its quite massive. I found out that if I set the random time to a fixed time things start to look okay but of course that's the very thing that sets this apart from just using a timeline.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It seems the issue might be with tags. I think if the tween finished contains ANY word from the tag then it triggers. I set each tag to just "centre" and "right" and now seems to work..

  • Are there many instances of this eye sprite or just one? With multiple instances, I guess the "Tween finished" event may trigger separately for each instance, which will cause multiple function calls. And there will be more and more such calls with each iteration.

  • Ah, yes, if tag contains spaces, each word is treated as a separate tag. It still shouldn't trigger more than once though.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)