ID:148523
 
var/turf/block/B = new()
B.loc = locate(src.x,src.y,1)

And it says, "Cannot change constant var" What does that mean? What did I do wrong?

And if I make it new(src.loc) it work... what's the diff?
Nova2000 wrote:
var/turf/block/B = new()
B.loc = locate(src.x,src.y,1)

And it says, "Cannot change constant var" What does that mean? What did I do wrong?

And if I make it new(src.loc) it work... what's the diff?

A turf can be created at a specific place (in a specific other turf), but it can't be moved. Only /atom/movable types can have their loc var changed once they're created.

Lummox JR
In response to Lummox JR
A turf can be created at a specific place (in a specific other turf), but it can't be moved. Only /atom/movable types can have their loc var changed once they're created.

Lummox JR

Thanks, that helped a alot...
As Lummox JR stated below, you cannot move it, if it's parent type isn't atom/moveable. But you can do want you want this way, I believe:
<code> var/destination_x = src.x var/destination_y = src.y var/destination_z = 1 var/turf/block/B = new(destination_x,destination_y,destination_z) </code>

Let me know if it works.

~>Volte