I`m trying to get this object to remove one of its verbs
obj/Bed/Bottom_Bunk/Bed_Bottom
icon_state = "Bottom_Bed_Bottom"
density = 1
verb
Bottom_Bunk()
set src in oview(1)
usr << "DUDE!"
usr.verbs -= /obj/Bed/Bottom_Bunk/Bed_Bottom/verb/Bottom_Bunk
it wont delete the verb, but when i replace the last line with
src.verbs -= /obj/Bed/Bottom_Bunk/Bed_Bottom/verb/Bottom_Bunk
it removes, but when i do usr(or src).verbs += /obj/Bed/Bottom_Bunk/Bed_Bottom/verb/Bottom_Bunk
it wont add it back
ID:177557
Aug 26 2002, 2:22 pm
|
|
Aug 26 2002, 2:35 pm
|
|
src is the bed, usr is the person using it... in both cases, it's src.verbs that you want to be changing... usr doesn't have this verb to begin with. If you use src.verbs in both places, it should work.
|
In response to Lesbian Assassin
|
|
Lesbian Assassin wrote:
src is the bed, usr is the person using it... in both cases, it's src.verbs that you want to be changing... usr doesn't have this verb to begin with. If you use src.verbs in both places, it should work. it doesnt, for some reason it wont give me the verb back, but it`ll take it away |
In response to Pillsverry
|
|
When you say "give me the verb back"... you never had the verb to begin with, the bunk bed did, which is probably your problem. In the code where you're trying to reinstate the verb, what is the src? Is the proc where you're giving the verb back contained within the /obj that the verb belongs to, or the mob using it, or something else? If it's not contained with the bunk bed, you'll have to figure out some way to refer to the bunk bed, because it's not the usr and it's not the src.
|
In response to Lesbian Assassin
|
|
obj
Control icon = 'Airship.dmi' icon_state = "Control" verb/Pilot() set src in oview(1) will make the verb appear when your 1 turf away from the mob or obj or turf then when you walk away it will disapear. |
In response to Zaltron
|
|
That's a different matter entirely... verb accessibility. We're talking about removing a verb from an item entirely.
Although, depending on exactly what he wants to do, verb accessibility might give an easier way to handle it. |
In response to Lesbian Assassin
|
|
I`m tring to reinstate the verb from another of the same objects verbs.
when User Clicks the Bottom_Bunk verb: user is moved to the object verb is removed from object when user clicks the Get_Out verb: things are done user is moved one space from the object(any direction) verb is added to object to allow the user to click Bottom_Bunk again if he/she chooses the only thing wrong with it is that it isnt giving the object the verb back, so if someone gets in then gets out that bed becomes un usable |
In response to Pillsverry
|
|
maybe you can try //THESE AERN'T SPACED CORECTLY
obj/Bed/Bottom_Bunk/Bed_Bottom icon_state = "Bottom_Bed_Bottom" density = 1 verb if(usr.bunk == 1) Bottom_Bunk() set src in oview(1) usr << "DUDE!" usr.verbs -= /obj/Bed/Bottom_Bunk/Bed_Bottom/verb/Bottom_Bunk usr.bunk +=1 else usr.verbs += /obj/Bed/Bottom_Bunk/Bed_Bottom/verb/Bottom_Bunk I hope thats what you are talking about |