turf
slide
icon = 'Turf.dmi'
icon_state = "slide"
Entered(mob/M)
if(ismob(M))
if(M.dir == SOUTH)
sleep(0.5)
step(M,M.dir)
else
return 1
I tried this and it doesnt seem to work, it only slides if you walk south but people can still walk ontop of it normally
ID:170046
Mar 27 2005, 6:46 pm
|
|
In response to Vermolius
|
|
hmm cant walk south now although can walk in any other direction without the slide function working
|
In response to Vermolius
|
|
The problem with that is that, if you enter the slide walking south, you are told to try and enter it again. You never actually stand on the slide, if you see what I'm saying? You need to set their location to the slide directly, then move them.
The return 1 should be return ..() too. Otherwise, people can always walk over the slide turf, no matter who's there. |
In response to Sheepywoolyfluff
|
|
To have it work with other directions, just remove
if(M.dir == SOUTH) .... |
In response to Dever
|
|
thats what i want it to do...its doing the opposite
|
In response to Jp
|
|
Jp wrote:
The problem with that is that, if you enter the slide walking south, you are told to try and enter it again. You never actually stand on the slide, if you see what I'm saying? You need to set their location to the slide directly, then move them. how do i do this? |
turf |
In response to Sheepywoolyfluff
|
|
Say m is the mob you want to move, and src is the slide.
Then you would say m.loc = src. That puts you directly on the slide, without calling Enter() or Entered() So you can slide freely. That code should probably be in Entered() anyway. Then you can do away with density checking or setting the location. Like this: turf/Slide |
In response to Jp
|
|
thanx that works
|
Your using Entered() which occurs when the "target" has successfully Enter()ed the turf.
Try switching to Enter().