Noob Questions about Scripting

Hey Guys...

I'm slowly getting the hang of how scripting works in RMVX Ace,  but am having an issue,

Im running a very basic script when i walk over a tile

window = Window_Base.new(100,4,300,50)
window.contents.draw_text(4, 0, 180, 32,
"Obtained a cool Item")

however, this new window and text seems to dissapear in 1-3 seconds, like a dispose is being ticked every so often.  Is it because I'm using the script in an event rather than calling it from that huge list? (if that makes sense)  Is there a Would anyone be able to guide me to a "keep this window up for an x amount of time or untill i say you can go away" command?

Thanks in advanced
do you have other part of script ? or the script is only that?
Perhaps we should compare nomenclature to prevent misunderstandings.

"eventing" is using the commands of the event windows for basic game operations

"Script calls" is using the script command of eventing to trigger minor changes, to check for otherwise unavailable data or to trigger functions added by scripts.

"scripting" is writing a script for the script editor, adding new functions to the game or changing existing functions - this is a full programming language.

What you posted above is not a full script, because it's missing parts like class or module headers.

I assume that you placed those lines into a script call command of an event, is that correct?
Perhaps we should compare nomenclature to prevent misunderstandings.

"eventing" is using the commands of the event windows for basic game operations

"Script calls" is using the script command of eventing to trigger minor changes, to check for otherwise unavailable data or to trigger functions added by scripts.

"scripting" is writing a script for the script editor, adding new functions to the game or changing existing functions - this is a full programming language.

What you posted above is not a full script, because it's missing parts like class or module headers.

I assume that you placed those lines into a script call command of an event, is that correct?
Absolutly correct,  thats litterally the entire script!  And just like that, my noobiness is shining! 
bump* 

so is that my issue that its just not an entire script? 
basically I would say yes - the script call command is subordinate to the event mechanisms, and I don't think it was ever intended for permanent changes (at least that's my assumption).

So you'll need to make a full script for controlling an additional window instance, and use script calls to change it's display status and content.

There are some scripts on the master script list that might help you learn how to do that - look for Yanfly's event window or anything named "gap window" on the master script list.
It's disappearing because the scope of the window is that script call only, so once the script call is over, it disappears when the garbage collector decides to claim it.


You should consider writing a full script as Andar suggested.

Original thread: https://forums.rpgmakerweb.com/threads/noob-questions-about-scripting.16060/