Hide Window
Category: Message
An event content that closes a specified window. The window frame and the text inside are both fully removed from the screen.
Difference between Hide Window and Hide Text
A very similar feature is Hide Text, but the behavior is different:
| Event Content | Window | Text |
|---|---|---|
| Hide Window (this event content) | erased (frame is closed too) | erased (together with the window) |
| Hide Text | remains (frame stays shown) | erased |
If you want to reuse the window and put different text in it, use Hide Text; if you want to fully close the window, use this event content.
Property List
| Item (tscn label) | Input Format | Description |
|---|---|---|
| Number | Integer (0-100) | Number of the target window to close |
Property Details
Number
Number of the target window to close. An integer in 0-100.
By matching the number specified beforehand with Show Window, you close that window.
Runtime Behavior
When this event content is executed, the following happens:
- The data of the window with the specified number is internally deleted
- The window node (the actual appearance on the screen) is destroyed
- Text nodes bound to that window are also destroyed
- Automatically proceeds to the next event content (no wait)
When the Target Window Does Not Exist
If the window with the specified number is not displayed to begin with, this event content does nothing and proceeds to the next event content. There is no error.
Other Windows are Not Affected
This event content closes only the window with the specified number. Windows with other numbers remain.
If you want to close all windows at once, use Hide All Windows.
Typical Usage Flows
Flow 1: Close the Window at the End of a Conversation
- Show Window (number
0) - Show Text (number
0, Wait Input ON) ← "Hello" - Show Text (number
0, Wait Input ON) ← "Goodbye" - Hide Window (number
0) ← End of conversation, close the window
The most basic use: close the window at the end of a conversation scene.
Flow 2: Close Only One of Multiple Windows
- Show Window (number
0, for body, bottom of screen) - Show Window (number
1, for character name, top of screen) - Show Text (number
1) ← "Hero" - Show Text (number
0) ← "I am the hero." - Hide Window (number
1) ← Close only the character name window - Hide Window (number
0) ← Close the body window too
A pattern of closing each window individually.
Flow 3: Close Temporarily and Re-show
- Show Window (number
0) - Show Text (number
0) ← "Please take a look" - Hide Window (number
0) ← Close temporarily - Show Picture (important scene) ← Display just the picture without a window
- Wait (3 seconds)
- Show Window (number
0) ← Reopen the window - Show Text (number
0) ← "How was it?"
Flow 4: Move to Another Staging Immediately after a Conversation
- Show Window → Show Text → Hide Window
- Fade Out Screen
- Change Map
The natural flow of closing the window at the end of a conversation and moving on to the next scene.
Typical Combinations
This event content is used to close the window at the end of message display. For the overall picture, see the Combination Patterns.
Basic Closing (Show Window ↔ Hide Window)
The basic rule is: once you have shown a window, always close it with this event content at the end:
- Show Window (number 0)
- Show Text (number 0) × multiple times is OK
- Hide Window (this event content) (number 0)
Close Only One of Multiple Windows
When multiple windows are open and you want to close only a specific number, use this event content. If you want to close them all at once, Hide All Windows is simpler.
Choosing between this and Hide Text
- This event content: Want to close the window along with everything
- Hide Text: Want to erase only the text and reuse the window
Related Event Contents
| Related Event Content | Purpose |
|---|---|
| Show Window | Counterpart event content (opens a window) |
| Hide Text | Erase only the text (window remains) |
| Hide All Windows | Close all windows at once |
| Show Text | Put text into a window |
Related Pages
| Page | Related Content |
|---|---|
| Event Content List | List of all event contents |
Notes
Use Hide Text if You Want to Erase Only the Text
This event content closes the whole window, so it is not suited for reusing the same window. If you want to erase only the text and reuse the window, use Hide Text.
No Error Even if the Target Window Does Not Exist
Even if the window with the specified number is not shown, this event content does not raise an error and proceeds to the next event content. Safe to use for "close just in case" purposes.
Closing Multiple Windows at Once
If you want to close all windows at once, instead of lining up multiple of this event content, Hide All Windows is simpler.
Reusing a Window You Closed Once
After closing a window with this event content, calling Show Window again with the same number creates a new window. The pre-close state is not restored (size, position, etc., need to be respecified).
