View Full Version: Im just wondering...

Game Maker > Questions and answers > Im just wondering...


Title: Im just wondering...


mlabre01 - October 10, 2003 11:28 PM (GMT)
I was wondering if you can type any name in and then it is used for the rest of the game?

BomberJake - October 10, 2003 11:43 PM (GMT)
it's possible to do that. you just need to use variables, but i'm not the best at variables. i'm sure someone else in this forum can help you out more in this situation.

Donovan_dcann - October 16, 2003 10:17 AM (GMT)
hey you need to use the
CODE
get_string();
like this
in create event of a object do this
CODE
global.playername = get_string('Enter a name','');

in drawing event
CODE
draw_text(x,y,'Hi '+string(global.playername));

Erik - October 16, 2003 06:12 PM (GMT)
Yup. ^
This way you can also store numbers, like What's your age, then you need to use

global.age= real(get_string('Enter age',''));

In the previous post, btw, the first bit of code is wrongly spelled (its get_string) (so you're not confused)

Burning Sheep Productions - October 17, 2003 08:20 AM (GMT)
If you know how to use variables it'll be easy for ya.
You just need the:
name = get_string("What's you name?", "Chickenman!");
show_message("Well hello "+string(name)+". What took you so long?");
show_message("Huh!?");
show_message("HUH!?");
show_message("Y' can't answer me can ya!?");
show_message("GET OUT OF HERE!!!");




Hosted for free by InvisionFree