turf/grass
icon='grass.dmi'
icon_state="grass"
Click()
if(usr.zan==1)
usr.loc=src.loc
ok this is wrong how would i make the usr goto what he clicked on?
ID:266538
![]() Apr 4 2002, 5:56 am
|
|
Rcet wrote:
He could use the walk_to() proc, but I'm not sure if that avoids obstacles. It doesn't avoid obstacles, but will work fine if there isn't expected to be any. :-) |
You can use,
turf/grass icon='grass.dmi' Click() walk_to(usr,src,0,0) Or, turf/grass icon='grass.dmi' Click() usr.x=src.x usr.y=src.y usr.z=src.z And this, pretty darn sure htis would work turf/click icon='grass.dmi' Click() var/location=locate(src.x,src.y,src.z) usr.Move(location) |
Super16 wrote:
You can use, Nice, but you're talking about two completely different approaches, as has already been mentioned. You can move usr directly, or make them walk to their target. You've just shown code to do both, and presented them as equals. Lummox JR |
usr.loc=src would be more accurate.
This will make you appear on the turf instantly. If you want to walk there, it's going to take a little more work. You might want to look for Deadron's pathfinding library.