Method WorldObject:GetNearObject [-] [+]
Returns nearest WorldObject in sight of the WorldObject. The distance, type, entry and hostility requirements the WorldObject must match can be passed.
Synopsis
worldObject = WorldObject:GetNearObject( range )
worldObject = WorldObject:GetNearObject( range, type )
worldObject = WorldObject:GetNearObject( range, type, entry )
worldObject = WorldObject:GetNearObject( range, type, entry, hostile )
worldObject = WorldObject:GetNearObject( range, type, entry, hostile, dead )
Arguments
number range (533)
Valid numbers: all decimal numbers.
TypeMask type (0)
The [TypeMask] that the WorldObject must be. This can contain multiple types. 0 will be ingored.
number entry (0)
The entry of the WorldObject, 0 will be ingored.
Valid numbers: integers from 0 to 4,294,967,295.
number hostile (0)
Specifies whether the WorldObject needs to be 1 hostile, 2 friendly or 0 either.
Valid numbers: integers from 0 to 4,294,967,295.
number dead (1)
0 both, 1 alive, 2 dead.
Valid numbers: integers from 0 to 4,294,967,295.
Returns
WorldObject worldObject
- See method description.