ID:145908
 
Code:
obj
abnormal
Tau_Ship
Orca_Computer
verb
Go_To_Planet()
set src in oview(1)
for(var/turf/Tau_Ship/O in world)
O.z = 4
usr.z = 4


Problem description:
Verbs.dm:1494:error:O.z:cannot change constant value

If I set it for objs of that type, it works fine. (Yes, I have objects and turfs of the /Tau_Ship type)

you cant move turfs using that code. make your ship out of objs and you can move those.
In response to Kidbuu001 (#1)
I tried, but the objects are moved into a different order.(Floors on top)

Could you direct me to where I can find how to change turf z?

Thank you.
Bobthehobo wrote:
Code:
> obj
> abnormal
> Tau_Ship
> Orca_Computer
> verb
> Go_To_Planet()
> set src in oview(1)
> for(var/turf/Tau_Ship/O in world)
> O.z = 4
> usr.z = 4
>


you need to use the locate() statement.

from what I understand, you want to locate a mob, (player), to a turf (the ship)

this should do.

so:
for(var/turf/Tau_ship/O in world)
usr.loc=locate(O.x,O.y,O.z)


If this is not what kind of thing your looking for, then please tell us.
In response to Crzylme (#3)
You can't change a turfs locations. Make it an object.
In response to Crzylme (#3)
Yeah, I wanted the mob and the turfs to move, thanks anyway.


I tried objects, but the objects keep changing order so floors end up on top of racks and guns. Any way to correct this? I don't think I need layers...
In response to Bobthehobo (#5)
Moving Turfs is not possible, turfs cant move.

Only Mob's and Obj's can be moved after compiling.
(Thats why they are called movable atoms)

Bobthehobo wrote:
I don't think I need layers...

I think you do . . .
In response to Bobthehobo (#5)
What you can do is save the turfs statistics to a variable and use turf=locate(1,1,1) and whatnot. It's sort of a basic in turf saving.
In response to Fint (#6)
Yeah, thanks everyone, I got it to work, and I did end up using layers...