This is probably a very dumb question, but I have been struggling with this for a while. I have a verb that I would like to allow for text input when you are typing it in on the input bar at the bottom, but if you click it just runs the verb without any input. Whenever I make my verb, it has to either have no arguments allowed so that when I click on it it just runs the verb, or if I make it allow input as follows, when you click on it it pops up with a window asking you what you want to enter. example
verb
who(A = "" as text)
usr << "This is my verb"
Did I make any sense? Any help would be greatly appreciated.
-Lutelian
ID:147511
Apr 17 2004, 5:36 pm
|
|
In response to Zaltron
|
|
this still isnt what i am looking for, I know I am not making myself clear. I want it to get rid of the input popup that happens when you click on the verb, while still allowing you to type in arguments for it manually. these examples still have popups ( in the input text example) when you click, and the second one (who) doesnt let you type text on the command line, only the name of a mob existant in the world. Short in short, I want to eliminate the popup when you click on the verb but still let it input an argument, i.e. text.
-Lutelian |
var/list/procs=list("do something") That should do basically what you want. Just give it the once over and you should be able to figure out how it works. |
In response to zackla21
|
|
Sorry, I still don't understand what your saying.
|
In response to Zaltron
|
|
I think he wants to use the command line to input text instead of a popup window.
|
In response to Tabu34
|
|
OK, I have had some sleep, and I can phrase it a little better...
I want to create a verb command that when you click on it, simply runs the command, but when you type it in manually, you can add some input to it, like a text string. The problem is, when I set it up like this mob/verb/MyVerb(t as text) usr << "This is a verb, if I click it, I get a text input window." if I click on the verb in the stat panel, it pops up a window asking for text input. On the command line it works fine, I can type MyVerb "whatever I want to type" I want it to NOT pop up with that window when I click it, so it works like this verb on click mob/verb/MyVerb2() usr << "This is also a verb, when I click it it simply runs, but I cant type in any input from the command line" I could make two different verbs with similar names, one with a space infront of it and the other no space and set it as hidden, but then its not truely running the same verb. I really hope I made some sense this time. -Lutelian |
In response to Loduwijk
|
|
im not normally this stupid, and im sure ill finally figure out what all you mean later, but I get an error
command :undefined proc with your code, I don't know what command is supposed to be and I think you are on the right track on what i am trying to accomplish, I dont know why I am having such a hard time -Lutelian |
In response to zackla21
|
|
I understood you the first time, and maybe if I help you explain then some of the people who cannot understand anything but the technical jargon will understand.
He has a verb with a text parameter and he doesn't want it to prompt the player to input an argument when the verb in the verbpanel is clicked, but he wants to still be able to input the argument in the command line if the verb is called via that route. mob/verb/MyVerb(T as text) If you click on the verb in the statpanel you will see "T is null", but if you type it in the command line then press space it will still show the opening quotation mark indicating that you can input the argument, in which case you will see (when you hit enter) the text string that you typed in after the verb name on the command line. |
In response to zackla21
|
|
zackla21 wrote:
I get an error My bad, it should be Command instead of command (capitalised "C"). |
In response to Loduwijk
|
|
I must be really dense, or im not understanding something, so please forgive me, but it still isn't working. I can click on the command ok, but if I try to type anything in, lets say I type in do-something and it works fine, but if I try to type in do-something "whatever argumentst to pass" or do-something whatever arguments, it doesn't work :/ I appreciate your help lodu very much, I think its very close to what im trying to get it to do, im just not as good of a byond coder as I would like to be
-Lutelian |
In response to zackla21
|
|
I thought it should have worked, but I just try it as well and it did not. It assumes I am trying to pass an argument to the verb when in fact I do not want to, and it fails to call the verb which it thinks I am trying to access. Since the command was invalid, it should call client/Command, but it does not. This must be a bug, sorry.
|
In response to Loduwijk
|
|
its all right, im just gonna make two commands for now, notice the space in the " who" name:
verb who_click() set name = " who" who_type("") who_type(t="" as text) set name = "who" set hidden = 1 //Do the who code |
mob/verb/input_text(t as text)
src<<"[t]"
mob/verb/who()for(var/mob/m in world)if(m.client)src<<m
mob/verb/who()
for(var/mob/m in world)
if(m.client)
src<<"[m]"