• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML How to make text boxes? Looked everywhere!

H

HarmlessTrust

Guest
Basically, after I searched literally everywhere on the internet, I couldn't find one text box engine that could work well with my game.
I tried a few youtuber's engines, but none of them could do the following:
- Stay in a box
- Stay a certain size
- Appear on the bottom if you are on the top half of the screen and/or appear on the top of the screen if you are on the bottom of the screen.
An example is in the picture.
I did so many trials and errors, like "if keyboard_check_pressed ((ord)("Z"))" but unfortunately it looks like I am not an "expert".

What I need is a textbox that has a typewriter effect (one letter added gradually), text that actually stays in the box itself, and make it appear on the top or bottom of the screen depending on the player's position.
Oh, and make sounds as if it were speaking (like Earthbound or Undertale).

If someone answers my question and solves it, I might give you credit if you want.
Dialogue.png
 

RangerX

Member
That's why learning is important.
You don't make a game just by frankensteining pieces of tutorials you watch together. You need to learn, to understand what you are doing and then you will not be limited to something extremely basic like a text box.
I'll help direct you into what you need to learn to figure this one out:

- You need to know how to draw a rectangle
- Alternative, make a rectangle sprite drawn by an object (basically how to draw a sprite on screen)
- How to draw text on screen

Now depending to how it works in your game, you probably need to learn something along those lines:

- When 2 objects collide, do something (maybe allow the drawing of the text box)
- When a certain key is pressed, have an object do something (maybe allow the drawing of the text box)



Start by the start and you're gonna reach the end my friend. Else your project will not see the light of the day.
 
Last edited:
A

arirish

Guest
I hadn't even thought about it drawing in a different part of the screen depending on where the player is. That's a good idea. I might have to figure out how to add that to my game.
 
Top