Get.posn

From AGI Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The get.posn command copies a screen object's current X and Y position values into variables.

Syntax

get.posn(obj oA, var vX, var vY);

Remarks

Variables vX and vY are set to the current coordinates of screen object oA.

Possible Errors

AGI does not check that object number oA is a valid object. If it is not, the returned values will be meaningless.

If the object has not yet been positioned, the results will be meaningless.

Example

Code:
get.posn(o1, v51, v52);
print("Object position is %v51, %v52");

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 39 (0x27 hex)

See Also

position
position.v
reposition
reposition.to
reposition.to.v