Centered window script request

xChikyx

Villager
Member
Joined
Aug 7, 2019
Messages
17
Reaction score
0
First Language
English
Primarily Uses
RMXP
Hi, I need something very simple this time. I've been trying to do this, but i gave up...
I just need a script that, when called, displays a message box centered in the screen with a text (the box limited to the content of the text in width and height), and when the player presses a specific key, it closes.
In theory this should be super simple but i can't manage to make it... please help

Edit to clarify:
I need the window to display the number of a variable, which can be changing, so i also need that the text refreshes itself, instead of waiting for the player to press space to clear the text box. If the player moves, of if they press X, the window is closed.
There is some other things behind, but i think I can manage to experiment with that after i have a window.
 
Last edited:

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
2,590
Reaction score
3,782
First Language
English
Primarily Uses
RMMV

I've moved this thread to RGSS Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.

 

callmedan

Friendly Stranger
Veteran
Joined
Dec 27, 2015
Messages
582
Reaction score
895
First Language
Vietnamese
Primarily Uses
RMXP
Do you use any message script? Ccoa’s UMS script or Wachunga’s Multiple Message script can help you do most of things you listed.
 

xChikyx

Villager
Member
Joined
Aug 7, 2019
Messages
17
Reaction score
0
First Language
English
Primarily Uses
RMXP
I use that one, but the text blinks when it jumps to the next text....
I decided to go with a huge engine instead of the script meanwhile. It works mostly as planned, bit I could totally change it once I have a script.
Besides, learning how to make a cented text window would be so useful for the future...
 

Andrea87Sky

Just a random musician/coder.
Veteran
Joined
Aug 30, 2017
Messages
93
Reaction score
1
First Language
Italian
Primarily Uses
RMXP
I use that one, but the text blinks when it jumps to the next text....
I decided to go with a huge engine instead of the script meanwhile. It works mostly as planned, bit I could totally change it once I have a script.
Besides, learning how to make a cented text window would be so useful for the future...
What do you mean with "the text blinks"? I use UMS too and I've never noticed a text blinking on a centered text window.
 

xChikyx

Villager
Member
Joined
Aug 7, 2019
Messages
17
Reaction score
0
First Language
English
Primarily Uses
RMXP
What do you mean with "the text blinks"? I use UMS too and I've never noticed a text blinking on a centered text window.
when you use the \w[x] on a short text within a cycle, for example:

Cycle begins
Textbox: \v[1] \w[1]
end

it makes the text blink
 

Andrea87Sky

Just a random musician/coder.
Veteran
Joined
Aug 30, 2017
Messages
93
Reaction score
1
First Language
Italian
Primarily Uses
RMXP
when you use the \w[x] on a short text within a cycle, for example:

Cycle begins
Textbox: \v[1] \w[1]
end

it makes the text blink
Dialogues are not supposed to go with a cycle, what you need to do?
I mean, if you cycle them, of course they glitch out, you cannot cycle them.
This will be a glitch that will happen in every script you'll use.
Again, what do you want to do? Maybe you are trying to use a parallel process/autorun method?
 

xChikyx

Villager
Member
Joined
Aug 7, 2019
Messages
17
Reaction score
0
First Language
English
Primarily Uses
RMXP
Dialogues are not supposed to go with a cycle, what you need to do?
I mean, if you cycle them, of course they glitch out, you cannot cycle them.
This will be a glitch that will happen in every script you'll use.
Again, what do you want to do? Maybe you are trying to use a parallel process/autorun method?
It needs to go in the cycle, otherwise, when the variable changes it won't display the new variable value.
I ended up making it so you press A+Space to decrease the number, or D+Space to increase it, removed the auto pass text so it doesn't blink, and worked fine at the and as an engine and not a script.
It was for a combination lock, like those which have just a dial with numbers that rotates (as in hidden safes for example). I could even make a whole Image of a safe and each variable number (from 0 to 30) represented as an individual image so it gets displayed, but I think that's too much work ahahaha
The idea is that somewhere in the game you get a 5 digit combination randomly generated for your game (so you can't cheat) and a direction. It could be a puzzle, haven't decided yet. The numbers range from 0 to 30, and can't be repeaded one after the other. For example, you can get 6, 21, 3, 16, 12. And a Direction, for example Left. Then you go to the safe, and, starting with the first number, you go 6, then move to the left until 21, then to the right until 3 then to the left until 16, then to the right until 12, and then you try to open it. If you made it correctly the safe will open.
It's kinda complicated to solve, especially since each game you'll have a random set numbers and a random direction, but I'm not planning to put anything crucial inside the safe. In fact, the safe so far can only be discovered if you ended up choosing the path that leads to the 1st quest in the first main interaction of events.
In fact, that's the most complicated thing i've done within the game so far. I created a "BlackBox" scrip that checks a file outside the game for cheat codes. Maybe I'll make a code you can input to set the code of the same something specific, but will be obtained only after finishing the game and only if you opened the safe... idk ahhaha
 

Andrea87Sky

Just a random musician/coder.
Veteran
Joined
Aug 30, 2017
Messages
93
Reaction score
1
First Language
Italian
Primarily Uses
RMXP
It needs to go in the cycle, otherwise, when the variable changes it won't display the new variable value.
I ended up making it so you press A+Space to decrease the number, or D+Space to increase it, removed the auto pass text so it doesn't blink, and worked fine at the and as an engine and not a script.
It was for a combination lock, like those which have just a dial with numbers that rotates (as in hidden safes for example). I could even make a whole Image of a safe and each variable number (from 0 to 30) represented as an individual image so it gets displayed, but I think that's too much work ahahaha
The idea is that somewhere in the game you get a 5 digit combination randomly generated for your game (so you can't cheat) and a direction. It could be a puzzle, haven't decided yet. The numbers range from 0 to 30, and can't be repeaded one after the other. For example, you can get 6, 21, 3, 16, 12. And a Direction, for example Left. Then you go to the safe, and, starting with the first number, you go 6, then move to the left until 21, then to the right until 3 then to the left until 16, then to the right until 12, and then you try to open it. If you made it correctly the safe will open.
It's kinda complicated to solve, especially since each game you'll have a random set numbers and a random direction, but I'm not planning to put anything crucial inside the safe. In fact, the safe so far can only be discovered if you ended up choosing the path that leads to the 1st quest in the first main interaction of events.
In fact, that's the most complicated thing i've done within the game so far. I created a "BlackBox" scrip that checks a file outside the game for cheat codes. Maybe I'll make a code you can input to set the code of the same something specific, but will be obtained only after finishing the game and only if you opened the safe... idk ahhaha
I'm sorry but text messages doesn't update like that. Or at least i don't think so.
I think the only way is making it from pictures and stuff.
A script that I recommend you to use in case you want to try making it with pictures is this: http://www.hbgames.org/forums/viewtopic.php?f=11&t=72241
 

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

Latest Threads

Latest Posts

Latest Profile Posts

:/ nope...today is canceled.
"...and I hope you like jammin' too."
This guy makes so many good hip hop tracks!
can't use certain things with SRDude's Battle Status Customizer? make the gauges show it lol. I got the gauges to show Olivia's Boost Points and other stuff.
Seeing people still using Kaus tiles with stolen contents makes me sad.

Forum statistics

Threads
95,545
Messages
929,976
Members
125,829
Latest member
Endruler
Top