I understand this would use world/New() but I'm having trouble checking what directions sand can be found in.
For example :
var/turf/Grass = /turf/Grass
for(Grass)
var/South = get_step(Grass,SOUTH)
if(istype(South, /turf/Sand)
I don't believe get_step works with turf for starters and I understand there is a limit to the amount of objects on a map so I can't make them objects. Any ideas on how I can do this? Thanks.
What's that supposed to do? As you've written it, it makes a variable called Grass, which holds a turf, and then stores the path /turf/Grass in it (which isn't a turf, it's the path to a type of turf)
It doesn't even matter what the variable contains, because the for loop overwrites it.
Despa1r wrote:
get_step works fine with turfs.
The only thing I can see wrong is that the type of Grass is /turf, not /turf/Grass. If you want a variable called Grass with a type of /turf/Grass, use
var/turf/Grass/Grass
You can also combine the first two lines to make it slightly easier to read: