ID:158454
 
I'm trying to make it tell the user in my server tab when people are typing, and have my client/control_text work properly for say...

I thought of two ways... Either define t as text by calling it in the verb name, and SOMEHOW... make the "typing" variable set once the verb is used...

Or ask for a way to get command_text to work with a verb like the following:


mob/verb/say()
typing = "Typing..."
var/t = input("What would you like to say?")as text|null
world<<"[src]: [t]"
typing = null


Otherwise I can't make it tell when someone is typing with this:

mob/verb/say(t as text)
typing = "Typing..." //This wouldn't work whatsoever.
world<<"[src]: [t]
typing=null


Any ideas?
How do you want them to know a certain person is typing ? A simple message ?
In response to Andre-g1
It displays in the stat panel.. I know how to do that part >_>... I need to know how to set the variable BEFORE call, so I can use it on client/command_text...

Also, if you know how to make a say verb, that has the text variable displayed in an input rather than in call, work properly with client/command_text, that helps too...
I don't think you can workaround option 1 to work with client/command_text.

Because client/command_text uses text as a verb argument, which is typed before the verb is even called.

If a workaround is possible, I have no idea how to do it.


[EDIT] - thought of something, rather inneficient, but if it's for a text game it should be good.

 
client
command_text="say "
var
last_commandtext

mob/verb/say(t as text)
world << "[src]:[t]"

mob/var/typing

client/proc/CheckCommandText()
for()
var/newtext = winget(src,"input","text") // assuming you're using a default skin
if(last_commandtext!=newtext)
mob.typing="Typing..."
last_commandtext=newtext
else
mob.typing=null
sleep(10)//sleep will affect how much typing var will update, if you want to be more precise, reduce it


It's kind of a noobie workaround but it does it's job. (if that isn't what you wanted, I'm sorry.)