简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
Help us translate Steam
Find, play, and make games easily
Discover, rate, and download the best player-created games made in
for free. Or try making your own and share with the community. Click
to learn more.
Nov 6, 2012 @ 4:03pm
How do you make Dialogue in a game?
Nov 7, 2012 @ 3:54am
There are a few tutorials on this in the Game Maker Community, the forum managed by YoYo Games. Generally, it would be to use the draw_text method, and one simple way of doing it is to get a script, and do this.
return "This is the first box of text."
return "This is the second box of text."
And you can generally work with this and make it more complex to fit your needs. you could have it so that this script could input the quest the player is in, the character, the discussion, and the block of discussion by nesting switch statements.
There are many other ways to do this, like instead of returning a string, you could handle all the drawing here, though that would be repetative unless you intend to make the text be more dynamic. You'd input this into the Draw Event of an obj_misc_dialoguebox.
And you don't have to be limited using draw_text, you could use draw_text_ext to make the text be colored. There are plenty of other things you could do, but this is just a general idea, so look up open source RPGs or tutorials on the matter. ;D
Nov 7, 2012 @ 12:45pm
Thanks! whers is a good place to get more tutorals?
The Sea Four
Nov 7, 2012 @ 1:18pm
The Gamemaker Community tutorial forum would be the best place, probably.
Nov 7, 2012 @ 1:36pm
Another way of doing it is to put all the lines of text into an array, like this:
line[ 0] = "Alice: Hi, I'm Alice";
line = "Bob: And I'm Bob.";
line = "Charlie: And I'm Charlie!";
line = "Bob: Go away, Charlie, nobody likes you";
line = "Charlie: :'(";
And have a variable (like "position") to keep track of which line is to be displayed.
You can something like a Keyboard event to change "position" so the player has control of the dialogue flow, or you can use a timeline to have the dialogue proceed automatically.
Last edited by
; Nov 7, 2012 @ 1:36pm
Nov 7, 2012 @ 5:36pm
so would i put it in the object or make a tottaly new object?
Nov 8, 2012 @ 10:26pm
Both suggestions are good ones, but because of how many different ways of displaying text there are the only way you're going to get all of your questions answered is to get in there and try it for yourself. I know that sounds cliche, but it really is the truth.
Per page: 15
Nov 6, 2012 @ 4:03pm
Start a New Discussion
Discussions Rules and Guidelines
[bug] Add Links broken
YoYo Games Steam Workshop Competitions
Report this post
Note: This is ONLY to be used to report spam, advertising, and problematic (harassment, fighting, or rude) posts.
© Valve Corporation. All rights reserved. All trademarks are property of their respective owners in the US and other countries.
Some geospatial data on this website is provided by
Steam Subscriber Agreement