/obj/door
var/open=0
Click()
if(get_dist(usr, src)>1) return
var/html="<a href='byond://?src=\ref[src];open=1;'>Open!</a>"
usr<<browse(html)
Topic(href, href_list)
if(href_list.Find("open"))
src.Open()
If two door objects are created by using one of the above options, then they may both end up with the same tag. This means that when the user clicks the 'Open!' link, the door the user didn't click may be the one that actually opens. This would be prevented if \ref returned a unique string for each object.
the tag depends on when the object was spawned from what I remember. the first object spawned probably has only numbers- and that number increases, or a letter is added or whatever. or am I just crazy?