ID:269024
 
Hey, I have two(2) problems. One, the enter proc for my Rave Dancing Revolution place, the turf has density, even when i turn off density for that turf, and it doesnt repeat. And two, my equip Item verb doesnt show the overlay of that image, how do I do that? Here they are:

Rave Music Playing Turf:
    Play_Rave_Music
density = 0
Enter()
if(usr.Rave==0)
usr.Rave=1
var/raveit=rand(1,5)
if(raveit==1)
usr<<'stillinmyheart.mid'
sleep(990)
while(usr.Rave==1)
raveit=rand(1,5)
if(raveit==2)
usr<<'Dynamite Rave.mid'
sleep(900)
while(usr.Rave==1)
raveit=rand(1,5)
if(raveit==3)
usr<<'Korn Got-The-Life.mid'
sleep(2170)
while(usr.Rave==1)
raveit=rand(1,5)
if(raveit==4)
usr<<'lets_groove.mid'
sleep(3450)
while(usr.Rave==1)
raveit=rand(1,5)
if(raveit==5)
usr<<'Theme of Rouroni Kenshin - Freckles - by Sobakasu.mid'
sleep(910)
while(usr.Rave==1)
raveit=rand(1,5)


And my equip Item verb:
obj
Glow
verb//Verbs to be used while you have any weapon in your
//inventory
Equip_Glow_Bands(mob/M)//Self-Explanetory
if(M.glowequip==1)//Checks if you have a weapon
//equipped already...
M<<"You are already equipped with a Glowband."//If
return//so it stops the verb from proceding
var/list/Glow=new()//if not it creates a new list
for(var/obj/Glow/m in M.contents)//Checks your
//inventory for any and all weapons.
Glow.Add(m)//and add them to the list
var/obj/Glow/weap=input(M,"What would you lke to equip?",,)in Glow//asks what you want to equip and assigns it to a variable
M.glowequip=1//and makes it so you have something
//equipped
weap.suffix="--Equipped--"//Adds --Equipped-- to the
//end of the weapons name
layer=MOB_LAYER+13
weap.equipped=1//used for unequiping purposes...
//So the computer knows what to unequip from you
M<<"You equip the [weap]"


RedStick
icon = 'Rave.dmi'
icon_state = "glowstickred"
name = "Red Glow Bands"
BluStick
icon = 'Rave.dmi'
icon_state = "glowstickBlue"
name = "Blue Glow Bands"
YelStick
icon = 'Rave.dmi'
icon_state = "glowstickyellow"
name = "Yellow Glow Bands"
PnkStick
icon = 'Rave.dmi'
icon_state = "glowstickpink"
name = "Pink Glow Bands"
GrnStick
icon = 'Rave.dmi'
icon_state = "glowstickgreen"
name = "Green Glow Bands"


Please help...
Ugh no usr in proc.
In response to Dession
Dession wrote:
Ugh no usr in proc.

Except in Click, DblClick, Login(?), and sometimes Stat()(?). And also, I believe it's okay to be in a proc WHEN it's called in a verb (?).
(?) = Not sure
In response to Hell Ramen
Click, and others, are called by the player and so are essentially verbs, not procs.
In response to Elation
Um...Yeah. That didnt make my music turf densityless. I still cant enter it.
First off you shouldn't be using usr in the Enter() proc since you can't be sure exactly what it'll be at that point. Seoncd off the Enter() proc is used to test if an atom can or can't enter the turf so you shouldn't be preforming any actions on the atom just checking if it can enter or not. If you want to preform some action on the entering atom you should do it in the Entered() proc which is called after the atom has successfully entered the turf.
In response to Dead_Demon
I believe you need to return a true/false value from enter. try putting return 1 at the end of the proc, or call it's super by putting ..() at the end of the proc. Putting return 1 means they can always enter it, putting ..() means the system will follow normal density rules.