ID:2048127
 
I tried to use Forum_Accounts "Turf Edges" resource but it doesn't work like I want it to since I have to press a verb to generate the edges.

I was just looking for a way to automatically generate edges upon bringing up the game. Kind of using overlays? But I need it to be multi-directional? If that makes any sense. So it's easier for me to map things.

http://prntscr.com/abqsgc < - Generate looking like that. So all I'd need to do is fill in the corners. When I have it that way on the map in DM; when it launches it's always missing one of the sides.

I know how to generate multi tile trees but would it work the same way?

If not how would I be able to tile them without this happening.

http://prntscr.com/abquba

I know it's somewhere in these forums or can come up somewhere in Google but I literally spent an hour searching and didn't find anything.

You don't have to make code for me, just explain what I'd need to do I think I'd be able to figure it out!! I'm just really slow. :(
How are you creating the edges? (i.e. Are you changing the turfs icon? Adding overlay icons? ...)

Also, there are at least a couple of libraries that do just this. I'm familiar with Foomer's 16-tile autojoining [and it's pretty good].
I'd change the path for the proc and var ofc, but this is how I'd do it.

It isn't tested be warned q.q

You'd want to put this inside of New() for the turfs that need edges, their edges should be numbered like so
[turf's icon_state] --> "grass 1" <-- [north state].

turf
var
tmp
obj
overlay_edge = new/obj
proc
update_edges()
spawn(world.tick_lag*3)
overlays -= overlay_edge
overlay_edge.icon = icon
. = 0
var
N = locate(type) in locate(x,y+1,z)
S = locate(type) in locate(x,y-1,z)
E = locate(type) in locate(x+1,y,z)
W = locate(type) in locate(x-1,y,z)
if(N) .++
if(S) .+=2
if(E) .+=4
if(W) .+=8
overlay_edge.icon_state = "[icon_state] [.]"
overlays |= overlay_edge
In response to Kozuma3
Kozuma3 wrote:
I'd change the path for the proc and var ofc, but this is how I'd do it.

It isn't tested be warned q.q

You'd want to put this inside of New() for the turfs that need edges, their edges should be numbered like so
[turf's icon_state] --> "grass 1" <-- [north state].

turf
> var
> tmp
> obj
> overlay_edge = new/obj
> proc
> update_edges()
> spawn(world.tick_lag*3)
> overlays -= overlay_edge
> overlay_edge.icon = icon
> . = 0
> var
> N = locate(type) in locate(x,y+1,z)
> S = locate(type) in locate(x,y-1,z)
> E = locate(type) in locate(x+1,y,z)
> W = locate(type) in locate(x-1,y,z)
> if(N) .++
> if(S) .+=2
> if(E) .+=4
> if(W) .+=8
> overlay_edge.icon_state = "[icon_state] [.]"
> overlays |= overlay_edge


---

Oh my, thank you! I'll try it out if it doesn't work I'll figure it out. ;P

FKI wrote:
How are you creating the edges? (i.e. Are you changing the turfs icon? Adding overlay icons? ...)

Also, there are at least a couple of libraries that do just this. I'm familiar with Foomer's 16-tile autojoining [and it's pretty good].

---

Thank you so much. I'm horrible at using search bars, not gunna lie. I kept searching edges, turf, etc. and none of those popped up I swear!! Lol, but thank you they're pretty much what I've been looking for.