ID:150223
 
Ok 1st, I'm not using input so I don't think the following code will work-> switch(input("Text","Title")

If there is some way to work this into my form of menu selection code let me know. The follow code is what I use and it works just fine. I only need to change the Bump-Mode word text to read, "Current Mode:[bumpmode]"

How do I work that into the title?

mob/pc/verb
Bump_Mode(B in list("Attack", "Talk", "Nothing"))
bumpmode = B

LJR
LordJR wrote:
Ok 1st, I'm not using input so I don't think the following code will work-> switch(input("Text","Title")

If there is some way to work this into my form of menu selection code let me know. The follow code is what I use and it works just fine. I only need to change the Bump-Mode word text to read, "Current Mode:[bumpmode]"

How do I work that into the title?

mob/pc/verb
Bump_Mode(B in list("Attack", "Talk", "Nothing"))
bumpmode = B

LJR


Well you could try doing this

mob
pc
var/B = input("Select your mode","Bump Mode:[bumpmode]")in list("Attack","Talk","Nothing"))
verb
bump_mode()
usr.bumpmode = B


This isn't tested but try it out, see if it works!
In response to Nadrew
Well...

1) Thats so messy compared to my code.
2) It says word, so I know there that is a default I can change somewhere, I just need the person that knows the actual code to change it in this way.

I got my idea for this code from an example I saw in the Blue Book. But for some reason I have not found an example of how to change the title without usnig the input method.

Anyone else got an idea? Dan? Tom?

LJR
In response to LordJR
Ok I got this code to add something but its not reading my var bumpmode. It shows up as unreadable characters.

set desc = "Current mode:[bumpmode]"

Anyone know what I need to do so I can read the data?

BTW, just using:
set name
set desc

After my code will change the dialog box descriptions.
I've learned this part. Now I just need to know how to get
data to appear right on the dialog box?

LJR
In response to LordJR
Set desc will set the input box title, but it can not be changed dynamically at runtime.

If the appearance is that critical, allow a null value and use an input box within the verb:

mob/verb/say(T as text|null) // allows T to be text or nothing at all
if(!T)
T = input("What would you like to say?","[src] says...") as text
In response to Shadowdarke
hmm I think it should be able to display at runtime! why the heck not!!?? :O

Anyways, I guess it will just be easier then this verb is called to do a usr << "Mode here output"

It won't look as nice, but will get the point across.