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
|
|
In response to DivineO'peanut
|
|
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 |
In response to Onimushia
|
|
get_step() returns the turf there. Since there can't be a turf in a turf...
|
In response to Kaiochao
|
|
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. |
In response to Onimushia
|
|
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 |
In response to Onimushia
|
|
I would do something like this:
mob |
In response to Lyndonarmitage1
|
|
Nothing, but five minutes too late.
|
In response to Kaiochao
|
|
Damn, good point. I should really double-check what I write before I post it. :-P
|
Otherwise, you'd be checking if the type /turf/water is in there, and a type isn't even an object!