RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

If direction ?

Nova

Wanderer
If direction ?

HI,
I try to handle Directions in my script,
but how can I ask an If Command that checks the direction ?

I tested the following, and none works
[code:1]if( this.Direction == "North" )[/code:1]
[code:1]if( this.Direction == North )[/code:1]
[code:1]if( this.Direction = "North" )[/code:1]
[code:1]if( this.Direction = North )[/code:1]

Anyone knows which Command is correct ?

-Nova
 

Nova

Wanderer
Ah I found out by myself.

To anybody who got the same problem:
[code:1]if( this.Direction == Direction.North )[/code:1]
works :)
 
W

Wasted

Guest
it changes when running.

(Direction.North) & (Direction.Running )
 

krrios

Administrator
the proper way to test:

[code:1]if ( (someMobile.Direction & Direction.Mask) == Direction.North )
{
}[/code:1]
 
Top