Noob Questions about Scripting

Faytless

recently unemployed Kung Fu Master
Veteran
Joined
Jan 27, 2013
Messages
244
Reaction score
164
First Language
English
Primarily Uses
N/A
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
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
do you have other part of script ? or the script is only that?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
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?
 

Faytless

recently unemployed Kung Fu Master
Veteran
Joined
Jan 27, 2013
Messages
244
Reaction score
164
First Language
English
Primarily Uses
N/A
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! 
 

Faytless

recently unemployed Kung Fu Master
Veteran
Joined
Jan 27, 2013
Messages
244
Reaction score
164
First Language
English
Primarily Uses
N/A
bump* 

so is that my issue that its just not an entire script? 
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
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.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
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

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top