ID:1507961
 
(See the best response by Lugia319.)
Problem description:
I want a way to change someones name on stuff like login and saying things and when you login it promts you for your name like it does when you use verbs
Best response
You're gonna wanna use the assignment operator and input.

var/x = input("What would you like your name to be?") as text // Requires input to be text (rather than numbers or something)
src << x // Displays x

Alternatively, if you're using a interface input to ask for a name, then you'd want to edit the input , go to options and select "Don't use this control for commands"

After saving this change, you will need to go to your Character creation code and make use of winget to retrieve the player's name

You can use something like this: (Beware it is only an example)

mob/verb
Create()
var/getname = winget(usr,"WindowNameHere.InputName","text") //input your window & input
if(!getname) return // if name is null, return
usr.name = getname
world<<output("[usr.name] has logged on!","output1") //change "output1" to your output name
Actually it'd be good to allow controls to take commands, because that means reusability. Instead of making an "input name", "input business name" "input secretary name" you can use the 1 window for all 3 by having them call the same verb.
Leaving the input open to command usage brings up a whole bunch of loop holes and room for errors. For example, you would be allowed to use the "World say" verb before even creating your character and using a bunch of verbs you shouldn't be allowed to use.
Nah, it wouldn't. Because you programmed your verbs properly to make sure they were only usable when the requirements were met.