MV I will test it in a fight. How does it for common events to run immediately through the F12 window?

I want to test my activity It would be easy if someone could tell how to do.

42a685c449bac9070fc273f35c6b6d16.jpg
What you've written works for me. Events can only run at specific points in battle, you might have to select some actions first.
What you've written works for me. Events can only run at specific points in battle, you might have to select some actions first.
Thanks for the reply, I tried it in that picture as well. But it doesn't work right away
I am referring to that it works. But have to press any button on the screen
So how do I get it to run through the script immediately?
What you've written works for me. Events can only run at specific points in battle, you might have to select some actions first.
Is it possible to make it work right away? That's what i'm searching for
I think there are two options:
  1. Change when the game updates the troop event interpreter, e.g. maybe try saving this as a .js file (Save As > File type: All Files, File name: whateverYouLike.js) and importing as a plugin:
    JavaScript:
    BattleManager.updateEvent = function() {
    //    switch (this._phase) {
    //        case 'start':
    //        case 'turn':
    //        case 'turnEnd':
                if (this.isActionForced()) {
                    this.processForcedAction();
                    return true;
                } else {
                    return this.updateEventMain();
                }
    //    }
        return this.checkAbort();
    };
    Not sure how much that'll help, though, and I assume there's a reason events are disabled in some phases. 😴

  2. Run whatever you want to do as a script call, straight from the console.
Thank you very much, but above method. I found that code rpg_manager.js It's not the right way to do it, I'm thinking I could use one of the logic, SceneManager.push (Scene_Battle), to get it working. During that command was run It's a simple solution and won't cause any problems.
I think there are two options:
  1. Change when the game updates the troop event interpreter, e.g. maybe try saving this as a .js file (Save As > File type: All Files, File name: whateverYouLike.js) and importing as a plugin:
    JavaScript:
    BattleManager.updateEvent = function() {
    //    switch (this._phase) {
    //        case 'start':
    //        case 'turn':
    //        case 'turnEnd':
                if (this.isActionForced()) {
                    this.processForcedAction();
                    return true;
                } else {
                    return this.updateEventMain();
                }
    //    }
        return this.checkAbort();
    };
    Not sure how much that'll help, though, and I assume there's a reason events are disabled in some phases. 😴

  2. Run whatever you want to do as a script call, straight from the console.

I want it to work under the conditions
if (code) {stuff} else {stuff}

test5a72e5fb736c7a5a.gif


Events, it cannot work immediately.
I want to know What should I do to know that
This is a scene that is not a fight scene.
If this action button is not in Scene_Battle
It will work incorrectly.
I call it together like this in the picture.
$ gameTemp.reserveCommonEvent (5);
SceneManager.push (Scene_Battle);
The result is that the event will run immediately and open.
Or you have an easy way to make me call this event anywhere. Without affecting Can go to another place Please guide with respect I can't find it now on my google hahaha
Oh, I see what you're doing now! 😀

This is only really a problem when in battle, so maybe try this:
JavaScript:
$gameTemp.reserveCommonEvent(5);
if (SceneManager._scene instanceof Scene_Battle) SceneManager.push(Scene_Battle);
This should only push the battle scene if you're already on that scene, allowing your reserved event to run during the "start" phase. 🙏
Thank you very much, this is really my problem. And it has been fixed by you, for a long time I tried to fix it myself.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/i-will-test-it-in-a-fight-how-does-it-for-common-events-to-run-immediately-through-the-f12-window.125703/