How do i hide the commands window, or verbs that i dont want the player to see?
In addition, i was planing on making it so when right clicking an object the player doesnt see the commands that way either,
or that they can only see some of the commands if the right requirements are met.
How would I go about accomplishing/starting EACH of these things?
ID:155309
Aug 1 2011, 8:41 pm
|
|
In response to Chaorace
|
|
Or:
set hidden = 1
|
In response to Neimo
|
|
but what if they meet requirements? I dont think i can put an if statement in the middle of that..
|
In response to Komuroto
|
|
You'd have to add/remove the verb from the verbs list as needed if you wanted it to be inaccessible when requirements aren't met (you should also program said requirements into the verb's action in case someone has the verb when they don't need it)
src.verbs += /mob/proc/my_hidden_verb
Defining it as a proc prevents it from being automatically added as a verb by default. You program it in the same way as a verb, though. You can remove verbs the same way. |
In response to Nadrew
|
|
well then couldnt i just do what i originally said?
Make a mob, and assign those verbs each time someone meets those requirements? But then again thats something that i wanted to avoid, seems like it would be alot of unnecessary coding. You sure theres no way around that? |
In response to Komuroto
|
|
Conditionally hiding and showing verbs requires altering the verbs list, or making use of verbs contained by objects in your contents. You can do something like:
obj Then if you add /obj/hidden_verbs to the player's inventory they'll gain access to the verbs contained by it, removing the object will remove the verbs. I didn't read the rest of the posts in this topic so I'm not totally sure what you've tried, but there are only so many effective ways of doing this. |
In response to Nadrew
|
|
i understand how to do that already :D
I was actually wondering if there was another way, but thanks anyways. |
1. set category = null i think