ID:159249
 
Hey. how do i make it so you click the button and Worldsay comes up in the text line. Like say there was a Button in the interface that says world, how do i make it so when i click it, i can type world chat in the text line at the bottom of the screen
I'm a little confused with what you want, but I'm guessing you want Worldsay to appear on the command line, or in the input box, by pushing a button. I'm not really sure how to do this, but wouldn't it be a better idea to make it so that you have multiple input boxes with labels to show which represents things like World Say, OOC and Say? Or to make it by pushing a button, you start a proc to initiate one of the before-mentioned verbs?
In response to Demon_F0rce (#1)
ok do you want it to be auto ooc or buttons like you click it and it comes up saying what would you liek so say and all if so then thats easy.




obj/hud
layer=FLOAT_LAYER+10000000
icon='hud.dmi'
worldsay
name="World Say"
icon_state="worldsay"
New(mob/M)
.=..()
if(!M||!M.client) return
screen_loc="9,11" // loc were u want it
M.client.screen+=src
Click()
if(!usr) return
var/msg=input(usr,"OOC") as text
usr.OOC(msg)

client/New()
..()
new/obj/hud/worldsay(src.client) // mabey src.mob




this is how i did the button for me
Set the input elements verb to some verb, and in that verb check a variable to see what the player is outputting to and handle appropriately. Make each button change that variable as needed.