ID:156835
 
In the Map Editor im having a small issue with placing turfs on top of other turfs.

I have set it to 'insert' instance on click rather than replace. However, ive noticed that behind the TURF im placing down 'holes' appear where it totally kills the TURF that was below it.

Im using an Entered() / Exited() call to make the turf 'transparent' when you walk "under" what would be a building (at first i thought it might be this causing the turf under it to become damaged). So having black gaps when you are walking around is a bit irritating. It only seems to do it at certain points in the image I placed down. However im not sure why as those points, as there does no seem to be any significance.

Here is an animated pic of screenshots.

First of all, why would you want to place a turf on another turf?
There can be only one /turf, any more and either the new one or the old one becomes an overlay (whichever is less "full") and two-filled /turf icons will have the old one replaced.

In short, there can only be one. Make these guys /obj and forum search for the custom procedure SteppedOn()

http://www.byond.com/members/jtgibson/forum?id=297#297
In response to Theironx
Theironx wrote:
First of all, why would you want to place a turf on another turf?

Because buildings don't lay on the floor. They go up. And turf has Entered() and Exited() which means i can make the buildings icon go transparent when you walk behind it (so it does not obscure the player).
In response to GhostAnime
GhostAnime wrote:
There can be only one /turf, any more and either the new one or the old one becomes an overlay (whichever is less "full") and two-filled /turf icons will have the old one replaced.

In short, there can only be one. Make these guys /obj and forum search for the custom procedure SteppedOn()

http://www.byond.com/members/jtgibson/forum?id=297#297

I see. Well thanks for that SteppedOn() will look into that. They were obj/ in the past but i wanted to avoid having to "fade" the top all the time and just have it fade when needed (when you moved behind it).

Will see if i can get SteppedOn() working for me :)
In response to GhostAnime
Honestly, I didn't know about SteppedOn() either. That should come in handy.
In response to Theironx
Trust me, it is. Another procedure that is handy is Bumped(). Try checking out the snippet database, you will sure find some things interesting
In response to GhostAnime
Well thanks for that anyway, working now.

I was doing locate() to find turfs within 1 space of the turf you were Entered() into. Making it transparent too. That does not work for objects, so ive done;

for(var/obj/BUILDING/cpark_tower_north/O in view(1)) if(copytext(O.icon_state,1,2)!="F") O.icon_state = "F [O.icon_state]"

for(var/obj/BUILDING/cpark_tower_north/O in view(2)) if(copytext(O.icon_state,1,2)=="F") O.icon_state = "[copytext(O.icon_state,3,0)]"


Works, though the radius of the transparancy always seems slightly off center. I have tried using view(1) for the exit (the last line is on SteppedOff, the first on SteppedOn) but that resulted in nothing happening.

Hmmm.