ID:171277
 
That would be very useful for my purposes, but I'm not sure how it's done.

Thanks for any help in advance.
mob
verb
Bleh()
set hidden = 1
src<<"Hello, Johnny!"


You mean like that?
In response to ZeroCrash
Actually, only sort of.

I want if a variable x = 1, then the verb is visible and can be used.

Otherwise, if x = 0, then the player can't see the verb and it can't be used.

How would I accomplish this?
In response to Gynax
Do you actually mean visible? If so you can put a verb on an object and make it only usable for people in view().

obj/flower/verb/pick()
set src in view() //Allow people in view() to use this verb.
view() << "[usr] picked a flower."


If not, then you can always add and remove verbs from a mobs verbs list.
mob/GM/Mute(mob/M in world)
M.verbs-=/mob/verb/say
In response to YMIHere
I mean the latter.

Thanks, I can actually use that to do what I want.

By visible, I mean the verb appears in the verb list when a variable is set to something. Not talkinga bout physical visibility.
In response to Gynax
Gynax wrote:
I mean the latter.

Thanks, I can actually use that to do what I want.

By visible, I mean the verb appears in the verb list when a variable is set to something. Not talkinga bout physical visibility.

Ok you need to be totally clear on that, the code that was given remove the verb from the list, it has nothing to do with visibility. Meaning, you cannot use this verb unless it is assigned back to you. When you play with hidden, it makes the verb invisible, but still usable. Also using the set src thingie, the verb is tied to the object that the verb is acted apon. so it doesn't exist unless you are near enough to the object and it is viewable by you....

(pant...pant...pant...)
In response to Jik
He means like:
if(asdf = 1)
M.verbs += mob/verb/pie()

Or something
In response to Hell Ramen
Yes, I mean pretty much what Hell Ramen says. heh
In response to Hell Ramen
Hell Ramen wrote:
He means like:
if(asdf = 1)
M.verbs += mob/verb/pie()

Or something

I was just pointing out what he was asking for is not what he wanted. invisible is diffent from removed, or proximity. Just incase something like this comes up again. He's not the only one reading these posts....

=)
In response to Jik
The only way I could think of doing this is using an object for a verb-type thing...
In response to Hell Ramen
Hell Ramen wrote:
He means like:
if(asdf = 1)
M.verbs += mob/verb/pie()

Or something

On this topic, can you make a verb remove itself once used?

If so how? I've tried this, it gives no error, but seems to act like I click the verb twice, and doesn't go away...

    verb
JoinGame()
if(isnull(host))
host = src //fisrt person to join becomes the host of the game.
//
if (joined.len == 9) //max players is 9
src << "Sorry, too many players."
return
if (joined.Find(src))
src << "You are already part of the game!"
else
//special setup when you join is added here
joined.Add(src)
world << "[src] has joined the game."
src.verbs -= JoinGame()
return
In response to Jik
I know, I've tried it too.
It doesn't work. :(
I've even tried invisibility.