Difference between revisions of "FindX"

From Wiki
Jump to: navigation, search
Line 1: Line 1:
{{header|FindItem|ro|The [[Var_findX|#findX]] system variable contains the x-coordinate of the object returned by [[findItem|findItem]]. If [[Var_findKind|#findKind]] equals 0, the coordinate is a screen coordinate, if [[Var_findKind|#findKind]] equals 1, the coordinate is a world coordinate.}}
+
{{header|FindItem|ro|The #findX system variable contains the x-coordinate of the object returned by [[findItem]]. If [[findKind|#findKind]] equals 0, the coordinate is a screen coordinate, if [[findKind|#findKind]] equals 1, the coordinate is a world coordinate.}}
  
{{Example|
+
== Example ==
 +
<pre>
 
.....
 
.....
 
loop:
 
loop:
Line 10: Line 11:
 
goto loop
 
goto loop
 
}
 
}
.....}}
+
.....</pre>
  
 
{{footer}}
 
{{footer}}

Revision as of 06:38, 27 August 2005

The #findX system variable contains the x-coordinate of the object returned by findItem. If #findKind equals 0, the coordinate is a screen coordinate, if #findKind equals 1, the coordinate is a world coordinate.

Example

.....
loop:
finditem %target
if #CHARPOSX <> #findx || #CHARPOSY <> #findy
{
move #findx #findy 0 0
goto loop
}
.....

See also

Main Page Documentation