ID:262955
 
Code:
turf
Enter_Build
icon = 'build.dmi'
icon_state="L"
Entered(mob)
usr << "Here are your building verbs!"
usr.contents += new/obj/Credwall
turf
Leave_Build
icon = 'build.dmi'
icon_state="L"
Entered(mob)
usr << "I'll take back the building verbs!"
usr.contents -= new/obj/Credwall

mob
Stat()
statpanel("World")
stat(" ")
statpanel("Build",src.contents)


Problem description: I place this on the map so that when you step on "Enter_Build" It gives you building verbs in the stat panel, and when you step on Leave_Build It takes all the building verbs away from you so you can't build in a certain area. But I doesn't work when I step on "Leave Build" the building verbs stay, Help. Also Is there also away I can just hide the build statpanel when you step on "Leave Build" and unhide it when you step on "Enter_Build I guess that seems simpler.

Your problem is that you're removing a new /obj/Credwall instead of the one in thier contents. If there is only one object you need to remove, I suggest using something similar to the following:
turf
Leave_Build
icon = 'build.dmi'
icon_state="L"
Entered(mob/M)
if(ismob(M))
M << "I'll take back the building verbs!"
M.contents -= (locate(/obj/Credwall) in M)


If you plan to have more, you should use a for() loop and put them under the same parent type (eg /obj/BuildStat/Credwall).

[edit]
Whoops, I must be sleep deprived to forget to check for usr abuse.
Also, do not use usr in procs. Use the argument for Enter() or Entered() to find out what entered the turf.

~~> Unknown Person
In response to DarkCampainger
Yes I do plan on having more. I don't understand how to type that in for adding in more? and also with the code you have there, once it takes the Credwall it goes away forever even though I keep steping on "Enter Build"..
In response to Kiyo Takamine
No one can tell me what happened? I'm not getting anywhere..
turf
Enter_Build
icon = 'city.dmi'
icon_state="clear"
Entered(mob)
usr << "Here are your building verbs!"
usr.contents += new/obj/Credwall
usr.contents += new/obj/floor
turf
Leave_Build
icon = 'city.dmi'
icon_state="clear"
Entered(mob)
usr << "I'll take back the building verbs!"
usr.contents -= (locate(/obj/Credwall) in usr)
usr.contents -= (locate(/obj/floor) in usr)


Like I said it takes away the building items, but when you step on "enter build" again you won't get them back..
In response to Kiyo Takamine
Does it display "Here are your building verbs!"?