Pre-terminate for JS

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
In VXAce, there's a part where when you do a Scene and terminate it, there's the pre_terminate function that allows you to do something before termination. For example, I want to change the location of my menu before I terminate it, but then I can't do that because when I press cancel, it terminates it right away. Is there a way in JavaScript to recreate the pre_terminate function?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
This was all there is to Ace

Code:
class Scene_Base  def main    start    post_start    update until scene_changing?    pre_terminate    terminate  endend
So what you could do is just call pre-terminate inside terminate
Code:
Scene_Base.prototype.terminate = function() {  // pre-terminate ?  // then normal terminate processing};
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
I tried doing this at first but it terminates it quickly. I'll have to reconsider my code, it could have been my mistake. Thanks a lot.
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
Scene_Base.prototype.stop is called first and the next scene waits until Scene_Base.prototype.isBusy returns false, before calling terminate. So, you can start your animation during "stop" and wait, until it's finished before returning false in "isBusy".
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
That is helpful. I will try this now and see how it works.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,019
Members
137,564
Latest member
McFinnaPants
Top