Dialog Box gets bigger after fight.

Silver Wishes

Villager
Member
Joined
Sep 7, 2014
Messages
26
Reaction score
17
First Language
Greek
Primarily Uses
Hello guys! I need help…  I hope this is the place to post this, I wasn’t sure.

I think my problem is between a script, a timer and a variable.

So what I was trying to do is create a ‘betting minigame’ in which the player has to gather more points (by defeating more monsters) than the NPC in a certain amount of time.

So I got myself a timer, a ‘Score’ variable and Galv’s  Respawn Timer Script.

Though somewhere along the way I did something horribly wrong and ended up with an overfed Speech Box.

speech box monster copy.png

What happens is… you talk to the NPC, the timer starts, all is good. After the first battle the speech box gets smaller by one line.

Tiny window.png

After the second battle it gets larger by one line and from then on it keeps growing.

Big window.png

This happens precisely at the end of the battle, should the player run, or the timer stop mid-battle the speech box will remain as was. And this is permanent… save-and-loading won’t fix it.

I tried stuff…  I erased the timer but kept the ‘Score’ variable and no problem whatsoever. Then I tried having an event setting the score to 0 and the window went back to its original size.

Here are the scripts I’m using in case you need to see them…

http://1drv.ms/1RnUqCk

Does anyone know how to fix this? And how did I manage to mess up the speech box of all things???

Thank you! :D
 

Clord

Nya~
Veteran
Joined
Aug 5, 2012
Messages
2,358
Reaction score
385
Primarily Uses
Some scripts utilize configurable variable fields.


For example a script checks a certain variable ID's value to know how many lines a dialog box should display.


There's also a loot related script online that uses switch to determine if it should display what items you obtain.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
Without even looking at your scripts I can guess that you're using Yanfly's Message script or something very similiar - because that script includes the option to change the text box size by changing a variable.

And because you didn't configure the scripts correctly, one of your other scripts changes the same variable, causing these variable sized text boxes.

Please check ALL your scripts for their configurations, and set all switches and variables to new ID, and make sure to name those variables so that you never use them again for something else.
 
Last edited by a moderator:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Try changing the variable that your score is stored in to variable 101. Very few scripts ever use variables above 100, so that should be safe. See if that fixes the problem.

Also, look at your message system script and find out what variable sets the size of the text box, mark that variable so you *don't* use it by accident like that.
 

Bribolox

Veteran
Veteran
Joined
May 20, 2012
Messages
92
Reaction score
25
First Language
English
Primarily Uses
Please check ALL your scripts for their configurations, and set all switches and variables to new ID, and make sure to name those variables so that you never use them again for something else.
That is something I literally just discovered for myself.  I used a switch # that happened to be the same switch that was assigned to disable the script!  I need to check the other scripts I'm using before I continue...
 

Silver Wishes

Villager
Member
Joined
Sep 7, 2014
Messages
26
Reaction score
17
First Language
Greek
Primarily Uses
@Andar

Oh my…

You’re right. I hadn’t really looked at that script since I haven’t put it to use yet…

I’ll make sure to be more careful from now on.

Thank you! :D

@bgillisp That worked too... I hadn't thought there would ever be a problem like that.

There's a lot I have to learn about scripts...

Lesson learned.

That's one less bug to worry about.

Thanks everyone!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top