Alright what I want to do is when a object is in the users direction, and in the players view of 1, a action would happen.
mob
verb
Test()
if(/turf/water in get_step(usr,usr.dir))
world << "1"
else
world << "2"
that is the only thing I came up with, which does not work at all.
ID:161023
![]() Jun 28 2008, 9:19 am
|
|
DivineO'peanut wrote:
Your code was almost correct, but you need to use locate() with /turf/water as the argument in this statement: Like this? It still does not work. mob |
mob I got it to work using this method only problem that when the players back is towards the water, it will still perform 1 which I do not want. I want it to perform the action only when the player is in the direction of the water, with a range of 1. |
You have to use the get_step() proc to check only infront of the player and the istype() proc to check if it's /turf/Water.
mob |
I would do something like this:
mob |
Otherwise, you'd be checking if the type /turf/water is in there, and a type isn't even an object!