ID:2164904
 
(See the best response by Ter13.)
Code:
obj/props/cage_button
icon='props.dmi'
icon_state="button"
density=1
name="Button"
verb/Interact()
set src in oview(1)
set hidden = 1
set hidden = 0
Text(usr,"<font color=purple><font size=small>[usr.key] has 'saved' the Princess!")
ButtonDrop()

obj/proc/ButtonDrop()
for(var/turf/outside/drophatch in world)
flick(src,"sky")


Problem description: One of the final pieces of code I need for my GIAD, but for some reason I can't figure out how to remove said turf/outside/drophatch and replace it with the sky turf.

Best response
new/turf/sky(drophatch)

Also, you've got an error there. drophatch is /turf/outside, not /turf/outside/drophatch.
In response to Ter13
Thanks buddy!

Stupid mistake.
Also, I'd recommend using the locate() command and the tag variable. for(x in world) loops through every object in the world.

locate("sometagname") performs an associative lookup. If you have a specific unique object you need to be able to grab later, but don't want to hang onto it in a variable, that's what tag is for.