GameMaker Tutorial #1: Adicionando entrada de texto ao seu jogo!

Edit @ 5:28 room_width é uma variável interna, não uma função! Este é o primeiro de uma série de tutoriais do GameMaker para desenvolvedores iniciantes/intermediários. Neste vídeo, aprendemos como lidar com a entrada de texto! Percebi que disse muito a palavra ‘então’. Vai trabalhar nisso. Sinta-se à vontade para fazer qualquer pergunta em relação ao tutorial/desenvolvimento do jogo/qualquer coisa. Se você tiver alguma crítica ou achar que minha voz é estúpida, vá em frente e diga isso também. Diga o que pensa.
source
there's no backspace to delete text. I'm not sure if I just got lost somewhere.
its really rare to see videos like th- wait this was 5 years ago? f*ck
Thanks!
18:27 that's not true, you'd need to use delta_time to measure the difference between frames when the game lags
at 15:51 you Draw event is in a way. then in 15:52 it is different?
Nice tutorial, I just had to read the comments for the backspace thing
Hey, really appreciate the video! I do have a problem though – similar to another commenter, but a little different.
I used string_width to set a max length on the text in my input box (to accommodate for different sized input boxes), and now I can't delete the last character either. Here's the code I've used so far:
if(string_width(global.tribe_name) < box_width-(2*x_buffer) && writable = true) {
// Name = typed text
global.tribe_name = keyboard_string;
} else {
// Keep the name we have typed if max length
keyboard_string = global.tribe_name;
writable = false;
// Delete last character if backspace pressed
// FUNCTION BELOW NOT WORKING
if(keyboard_check_pressed(vk_backspace)){
var name_length = string_length(global.tribe_name);
string_delete(global.tribe_name, name_length, 1);
writable = true;
}
}
Basically I'm trying to delete the last character if you press backspace, but it's not having any effect. Any support would be greatly appreciated because I want to learn what I'm doing wrong, rather than copying a workaround. Thanks! 🙂
awesome!