In game script creating "box" thingy

You'll need to look close at this picture to see it,
fJCqLH2.png


But between "Beautiful" and "day, my lord" there is space with a box character.

Here is the event:

Fk10e2e.png


In Falcao's ABS Pearl, you can have events do little "popups" with dialogue. For some reason, if the dialogue in the script goes on to the next line, it creates this bizarre spacing with this box character. Does anyone know how to fix it?
That's an unrecognized character. The font didn't know how to draw it and so it shows a square. It's probably because you broke the text in two lines. Try writing the whole code in a single one. If you need to write text in two lines, type \n instead of adding a new line to the script.

And if you really need to write the script in two lines, you should do it like this:

Code:
$game_map.events[70].pop_damage('Beautiful\n' +'day, my lord!'
That's an unrecognized character. The font didn't know how to draw it and so it shows a square. It's probably because you broke the text in two lines. Try writing the whole code in a single one. If you need to write text in two lines, type \n instead of adding a new line to the script.

And if you really need to write the script in two lines, you should do it like this:

$game_map.events[70].pop_damage('Beautiful\n' +'day, my lord!'

Thank you for the reply. I was almost sure that I would not be able to get help on this very narrow issue. I think your code is missing an end ")"

I tried it out and this happened.

47DBI51.png


Is there something wrong with my script box? why is it so short? It will only let me type the code like this

Code:
$game_map.events[70].pop_damage('Beautiful\n' +'day, my lord!')
And this way?

$game_map.events[70].pop_damage("Beautiful"+"\nday, my lord!")
My script box can fill the whole thing in a single line.
Try changing \n to \\n
Try changing \n to \\n
Ah, right.

I always forget about this.
FYI: there was an update that increased the size of the script box, but I don't know if only steam got it or if it's available in the new regular setup.


But it is NOT an automatic update for the non-steam version, in the non-steam my scriptbox is a lot smaller.
You all assumed that the popup script uses draw_text_ex...

It is not, therefore \n will not work.

And why would that \n be needed anyway? o.o

He never said he wanted the text to be divided in two lines, right?

$game_map.events[70].pop_damage("Beautiful"+" day, my lord!")This should work just fine.Also:

Code:
t = "Beautiful day, my lord!"$game_map.events[70].pop_damage(t)
Should work too.
Both work perfectly, Sixth! Thank you all!

Sixth is the master 🙂 thanks Sixth, sneaking out of retirement to save me. You have to try my remade first chapter when its done!!

P.S. Sixth, May I ask... if the pop txt isnt drawn typically, how would I get it to overlay above all other graphics. Right now, the trees in the picture above overlap the pop text. I want the pop text to overlap everything else. Usually I set "self.z = 101" somewhere, but if its done differently in the ABS, I'm not sure how I would do that.
The damage popups use @viewport1 as their viewport, so the typical self.z won't help, unfortunately.


You can try to change the viewport used by the damage popups.


Find this line in the Pearl Sprites script:

@damagepop_sprites.push(Sprite_DamagePop.new(@viewport1, target))And change the @viewport1 to @viewport3. That viewport got the highest z value, so that is your best shot.
There should be two lines like the above in the script, so change the viewport for both of them.
Works perfectly. I'll PM you.

Original thread: https://forums.rpgmakerweb.com/threads/in-game-script-creating-box-thingy.40736/