The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: heisenman on October 24, 2010, 01:27:46 PM

Title: Dispose text window by script call.
Post by: heisenman on October 24, 2010, 01:27:46 PM
I think this is a rather easy request.
I need to dispose a text+choices window by script call, because each option leads to a new scene, but the text window doesn't automatically close itself after the choice is made, and it's visible under the new scene.
Title: Re: Dispose text window by script call.
Post by: heisenman on October 28, 2010, 09:52:20 PM
Bump (:
Title: Re: Dispose text window by script call.
Post by: Deity on October 28, 2010, 10:35:58 PM
The window have to be disposed by the method:
window.dispose
In the most cases it's written into the terminate method of the scene. ;)
Title: Re: Dispose text window by script call.
Post by: heisenman on October 28, 2010, 11:14:23 PM
I get this error :/
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg641.imageshack.us%2Fimg641%2F4485%2F0000rc.png&hash=d2c0261f947765272f3ba7307ce40e02fa7dd2e7)

Pheraphs I did not explain myself clearly, I do not need to dispose a window in a script, I only need to dispose a regular text window by script call ^^"
Title: Re: Dispose text window by script call.
Post by: Deity on October 29, 2010, 07:24:02 PM
Yeah the error is understandable cause the variable window isn't defined. ^^ The window in which will be drawn has a variable which has a name this variablename you have to use.
Maybe you just want to clear the bitmap of the window? Then you have to use also the variablename and call the method "contents" which return the windows bitmap. Now you've to clear the bitmap by call clear. All in all:
window-variablename.contents.clear

Greetings Deity
Title: Re: Dispose text window by script call.
Post by: heisenman on October 30, 2010, 05:54:45 AM
Ahaha I have no idea what you are talking about ;8
Ok, it's not important, thanks for your patience Deity.
Title: Re: Dispose text window by script call.
Post by: modern algebra on October 31, 2010, 06:48:42 PM
Are you using a message script? If so, which one? The text box should automatically be disposed when going to a new scene - it is an error in the script if it doesn't and it should be fixed in the offending script.
Title: Re: Dispose text window by script call.
Post by: heisenman on November 05, 2010, 05:27:34 AM
No, I have no scripts in my project beside default ones (I plan on adding a text system later though).
Do I need to provide some screenshot?



I swear I though this would have been the simplest request ever, maybe I'm speaking strange.
Title: Re: Dispose text window by script call.
Post by: modern algebra on November 24, 2010, 02:35:42 PM
Well, I'm still not positive I even know what you're asking for. It sounds to me like you're saying that when you open a new scene the text window is still open and it blocks some of the scene. That's kind of what it means when you say it isn't disposed. If you're not using any scripts, then that's impossible...

So maybe all you mean is that when it takes a screencap for the background of a scene, the text window is still open and so that forms part of the background? Is that yout problem? If so, just put a wait event command right before calling the new scene.
Title: Re: Dispose text window by script call.
Post by: heisenman on November 24, 2010, 02:56:51 PM
Thanks for your help, but I workarounded the problem putting an image as background (:
Consider this solved ^^
Title: Re: Dispose text window by script call.
Post by: modern algebra on November 24, 2010, 04:33:23 PM
Ah, so it was that it was just being screencapped :)

Anyway, I'm glad it's not a problem anymore. If you do want to move back to the map background, there would be a very easy scripting solution if you don't want the wait frames.
Title: Re: Dispose text window by script call.
Post by: heisenman on November 24, 2010, 05:57:35 PM
The wait frames are the arrows in the text window when awaiting input?
Title: Re: Dispose text window by script call.
Post by: modern algebra on November 24, 2010, 08:06:39 PM
No, I meant use the Event Command: Wait. So make the event look like:


@>Show Choices: Item, Status, Skill
   :  When [Item]
      @>Wait: 6 frame(s)
      @>$scene = Scene_Item.new
   :  When [Status]
etc...

But like I said, you could also get a simple scripting solution if you didn't want the Wait frames.