ID:178283
 
I'm having truobles with toggling verbs, on this code the song verbs are appearing when the only verb that are supposed to appear is the Sample_CD verb. then once you cick on it the song verbs pop up. so what am I doing wrong
obj
music
boombox
icon = 'music.dmi'
icon_state = "boombox"
name = "Boom Box"

cd/sample_CD
icon = 'music.dmi'
icon_state = "sample"
name = "Sample CD"
var
sample = 0
verb
Sample_CD()
set src in usr.contents
set category = "Music"
src.sample = 1
if(src.sample == 1)
src.verbs -= /obj/music/boombox/cd/sample_CD/verb/Sample_CD
// src.verbs -= /obj/music/boombox/alternative/verb/Alternative_CD

src.verbs += /obj/music/boombox/cd/sample_CD/verb/Linkin_Park_Crawling
src.verbs += /obj/music/boombox/cd/sample_CD/verb/DBZ_Battle_Z
src.verbs += /obj/music/boombox/cd/sample_CD/verb/FF7_Hurry
src.verbs += /obj/music/boombox/cd/sample_CD/verb/ Offspring_Pretty_Fly_For_A_White_Guy

Linkin_Park_Crawling()
set category = "Music"
set name = "Crawling"
usr << sound('crawling.mid',1)

DBZ_Battle_Z()
set category = "Music"
set name = "Battle Z"
usr << sound('battlez[1].mid',1)

FF7_Hurry()
set category = "Music"
set name = "Hurry"
usr << sound('ff7hurry.mid',1)

Offspring_Pretty_Fly_For_A_White_Guy()
set category = "Music"
set name = "Pretty Fly For A White Guy"
usr << sound('pretty_fly.mid',1)
When you are using src dealing with a different atom path the src is the atom its involved meaning it's subtracting and adding verbs to the obj crazy huh :-p
In response to Super16
Super16 wrote:
When you are using src dealing with a different atom path the src is the atom its involved meaning it's subtracting and adding verbs to the obj crazy huh :-p

I couldn't understand what you meant thee so could you or someone else put what he means in lamens terms for me.
In response to LittleKid15
Well when not dealing with mobs the src is no longer you it is the item you are dealing with so go about it as this,

var/mob/M = usr
M.verbs.Remove(/mob/verb/Sample, /mob/verb/BuyCd)
M.verbs.Add(/mob/verb/Linkin_Park, /mob/verb/WhiteGuy)

I don't know the verbs but I think that would give you a picture.