Assistance with the script feature in the conditional branch, please!

What I'm looking to do is set up a common event that can be triggered with Yanfly's ButtonCommonEvents but only if battle processing is going on.


I tried pasting


SceneManager.push(Scene_Battle);


into the script part of the conditional branch, but that didn't seem to work. I don't know JavaScript so I don't know if that's the correct way to express that at all. It's just what I tried.


Thanks in advance.
This can't work ^^ In the conditionnal branch, you have to put something that returns true or false. 

SceneManager.push(Scene_Battle);



Is used to create a Battle scene, or something like this. It's used to show something. 


But I don't know the JS function you're searching.
I've moved this thread to Javascript support. Please be sure to post your threads in the correct forum next time. Thank you.
To check if the party is in battle you can use


$gameParty.inBattle()


in a conditional branch.

Original thread: https://forums.rpgmakerweb.com/threads/assistance-with-the-script-feature-in-the-conditional-branch-please.71991/