Change Turf On Run-Time in Developer Help
|
|
So currently I have a map with 3 islands made of the turf grass with a sand edge to them. Where the grass and sand meet I would like those tiles to be replaced with a tile that merges the two. I have the tiles and I could manually go through the entire map to place them but I would like them to be updated on run-time instead.
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/GrassYou can also combine the first two lines to make it slightly easier to read: