Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / [SOLVED] How to stop processing until an animation completes?

Author
Message
Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 22nd Jul 2018 22:39
Let's say you want to do an elaborate animation, but you don't want anything else processing while the animation is going on - thinking when you kill a creature the animation is a bit more elaborate.

I can only think of adding a global "switch" and an if statement in the main loop. Do you guys think there is a better way?

The author of this post has marked a post as an answer.

Go to answer

Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 23rd Jul 2018 00:58
I set up an animation handler, in which I manually calculate and set the active frame which also let's me control follow up animations and callback functions to execute when the animation ends
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Richard_6
7
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 23rd Jul 2018 12:54
GetTweenSpritePlaying / GetTweenObjectPlaying maybe?
Supertino
7
Years of Service
User Offline
Joined: 22nd Jun 2017
Location: Behind you!
Posted: 25th Jul 2018 08:43 Edited at: 25th Jul 2018 08:43
This post has been marked by the post author as the answer.
A little extreme but you could lock it in a while loop;

Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 14th Aug 2018 01:14
Exactly what I wanted Supertino. I always forget the power of repeat and while. I wanted something like the kill scenes in Mortal Kombat, God of War, etc. where everything stops until the animation completes.

Login to post a reply

Server time is: 2024-11-23 04:49:23
Your offset time is: 2024-11-23 04:49:23