Steam'i Yükleyin
giriş
|
dil
简体中文 (Basitleştirilmiş Çince)
繁體中文 (Geleneksel Çince)
日本語 (Japonca)
한국어 (Korece)
ไทย (Tayca)
Български (Bulgarca)
Čeština (Çekçe)
Dansk (Danca)
Deutsch (Almanca)
English (İngilizce)
Español - España (İspanyolca - İspanya)
Español - Latinoamérica (İspanyolca - Latin Amerika)
Ελληνικά (Yunanca)
Français (Fransızca)
Italiano (İtalyanca)
Bahasa Indonesia (Endonezce)
Magyar (Macarca)
Nederlands (Hollandaca)
Norsk (Norveççe)
Polski (Lehçe)
Português (Portekizce - Portekiz)
Português - Brasil (Portekizce - Brezilya)
Română (Rumence)
Русский (Rusça)
Suomi (Fince)
Svenska (İsveççe)
Tiếng Việt (Vietnamca)
Українська (Ukraynaca)
Bir çeviri sorunu bildirin
Therefore, you can feed the draw event a dialogue string like so:
If you change the value of that variable, the text will update in the next frame. So make the spacebar press trigger an update to that dialogue variable.
If you have a lot of dialogue, it might be a good idea to store the text in an array (in the create event, or as a global variable).
And when you hit the spacebar, increment that current dialogue as the array index:
Hope this helps you!
EDIT: And make sure you're only having the spacebar increment dialogue while the dialogue is actually being displayed. Also make sure you stop the dialogue from incrementing passed the arrays total length (in this case "2") or the game will crash.
Thanks for the reply, I'll edit to showya if this worked for me :)
Whenever space is pressed, it increases global.Tutorial_Dialogue_Progression.
Then there's a whole mess of if statements that change the string in global.Tutorial_Dialogue.
Works great :)
One lil' thing that's bugging me though. Is it possible to indent or paragraph the text that you draw? At most I want to have 2 lines showing at a time, but this makes it look like we can only use 1.
You can also use the hash "#" character inside a string to force a line break.
In the Draw event , i type
draw_text(x,y,dialogue[current_dialogue])
And all is working perfectly !! It seems that the command "dialogue_string_variable" wasn't recognized by Game Maker.
visible = falseGame
and turn off the draw event for the specific instance. You can set it to true to turn the draw event back on.
"dialogue_string_variable" was just an example of a variable I created to demonstrate how to display simple dialogue. It's not a built-in constant or function. You can name variables whatever you want.
In retrospect, I'm not sure I would use an array in this case. Arrays in Gamemaker are pretty slow and buggy. It's probably better to store your dialogue strings in a data structure or an external file.