Need help !

Hi! I need help with a script code for the "Exit Event Processing" command.

I'm creating a JS file and I need to stop processing in certain cases, try the 'break'
doesn't work, and others I found in my research, but nothing worked.

How can I finish processing an event via JS file style the event command
"Exit Event Processing" being a script?

Thanks.
Hello welcome!

I didn't quite understand your question, you want to stop a specific event, if that's the case, you can solve it even with Switch.

But if you want to stop a script or a function you can use this:

Good luck
another way if you use JS (as a plugin), you need to provide more
info or the code you have and what you need, for example:

a scriptcall to make it false, and make it true otherwise if used.

if it's in an event, show a screenshot of your event, so we can see
what you did wrong.

as @Dev_With_Coffee said, you can use a switch or selfswitch to
stop it or run it again being ON and OFF.

I would also advise to change your Title to something meaningfull
rather than "I need help!" because many need help, and we need
a more direct title of your problem and details inside, so people
with knowledge on that part can give you a straight solution on
how to solve it.
The Exit Event Processing is handled by the event interpreter - if you search for it in the code, you find the function that's called by the event command is Game_Interpreter.prototype.command115 which just changes some internal references.

I second the opinion that the easiest way to do what you want is to make your script set a variable/switch (or return a value for one), and on the next line you check that value and exit the event the regular way.

Original thread: https://forums.rpgmakerweb.com/threads/need-help.141962/