Main Menu
  • Welcome to The RPG Maker Resource Kit.

Dispose text window by script call.

Started by heisenman, October 24, 2010, 01:27:46 PM

0 Members and 1 Guest are viewing this topic.

heisenman

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.


Deity

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. ;)
Greetings
DigiDeity


├Work┤
├Contact┤


heisenman

I get this error :/


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 ^^"

Deity

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
Greetings
DigiDeity


├Work┤
├Contact┤


heisenman

Ahaha I have no idea what you are talking about ;8
Ok, it's not important, thanks for your patience Deity.

modern algebra

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.

heisenman

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.

modern algebra

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.

heisenman

Thanks for your help, but I workarounded the problem putting an image as background (:
Consider this solved ^^

modern algebra

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.

heisenman

The wait frames are the arrows in the text window when awaiting input?

modern algebra

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.