ID:141939
 
Code:
obj
clickable
say
icon='visual.dmi'
icon_state="equip"
Click(null,null,null,msg as text)
flick('clicked.dmi',src)
usr.say() //Here.


Problem description:

How would I get it to call the verb say and still ask what you want to type?

EDIT: This might go in developer-how-to, but I have a code too. :/

You know how arguments work, no?

obj
clickable
say
icon='visual.dmi'
icon_state="equip"
Click()
flick('clicked.dmi',src)
usr.say(input(usr,"What do you want to say?") as text) //Here.
In response to Jeff8500
Why have it like that? (Plus you dont need that usr there, since usr is default).

obj
clickable
say
icon='visual.dmi'
icon_state="equip"
Click()
flick('clicked.dmi',src)
usr.say()
mob/verb/say(msg as text)
//Some if()'s to see if they can talk, and/or a filter system here then...
world<<"[src] sayz: [msg]"


Wouldnt that work the same, without having to use input and such like that.
In response to Bakasensei
Oh, yes, I forgot, usr is default. Try removing usr and compiling that. You'll see why I put it.

Also, the message will be null by default. You really need to brush up on your DM. In a test world, clicking it will output "[src] sayz:"
In response to Jeff8500
I think 'src' is actually the default on Click. If I remove 'usr', then it doesn't seem to know that the verb Click belongs to a mob.


I didn't know you could use input for anything beyond already defined lists. Good to know.
In response to Bakasensei
The verb arguments are only handled like that when attempting to use them in a DS window.

Just calling usr.say() will call the verb just like that, with no arguments or anything.

ps: src is default, not usr
In response to Keeth
Hm, he may be referring to the usr in the input(), where it is default.
In response to Speedro
src is always the default in a proc. He could have meant in input(), as GhostAnime said, and I overlooked that; if he was talking about input(), though, he should have been more specific.
In response to GhostAnime
Yeah, I should have said that clearer. And I was just saying if that is possible, I didn't know myself and was wondering why he was doing it like that. Thanks for telling me though ^^