ID:926343
 
Problem description: I'm creating a game like Kritter Krawler and I've got to the point where I need to make a program. If you play the game, it's that line. I've made the line, but I don't know how to make it connect all of the peice's around it? if you don't know what I'm talking to because you haven't played the game... go play the game.

How would I create something what does that? I really hope this is possible, this game is going to be amazing is it is.
for(var/turf/green in getstep()) Should easily serve your purpose.
Does that actually work? I don't think getstep() returns a list, so I didn't think you could use it with an iterative loop like that.
In response to Ter13 (#2)
Ah yes, but I was thinking more along the lines of changing the turf you're using as a base for get_step(). Though I'm not sure if this would cause it to loop. It'd require testing.

turf
Enter(mob/m)
var/l=src
for(var/turf/t in get_step(l,DIR))
t.icon_state="Icon State2"
l=t

The example is, of course, just something I roughly drew up to showcase what I mean.

[EDIT]
Forgive me, I needlessly placed mob/m in there, I was originally going to add in a check if the mob entering was a client. But I decided that bit was unneeded.
[END EDIT]

[EDIT 2]
            var/turf/l=src
while(l)
var/turf/t = get_step(l,EAST)
world<<"[t]"
l=t


After testing, for() didn't turn up as expected, while() however, did so perfectly.
[END EDIT 2]
In response to Ter13 (#2)
Also, you could call this inside a proc for the turf, then call it again for the next turf inside of the for()though I suppose then the better solution would be:
var/turf/t=get_step(src,DIR)
I still don't really understand what you mean NNAAAAHH? Could you create a the code for me? this is my first time ever making stuff like this, and I'm really confused lol.

Edit: I tested out your snipplets above to see if I could figure out and it seems as it's just making the line. I already made the line, it's just the filling in part I have to create ;/
In response to Flysbad (#5)
I gave examples for everything; I'm not going ot make the code for you and you shouldn't post in developer help asking for such. There is a classified ads section you can use for that.
You need a flood fill algorithm:
http://en.wikipedia.org/wiki/Flood_fill

They're pretty simple to implement, although it's a bit more difficult to implement one efficiently.