SetPersonXYFloat
From Spheriki
Set the position of a person with floating point accuracy.
Contents |
Usage
- person_name string. The name of the person to set the position of.
- x number, may be floating-point. X coordinate of the new position.
- y number, may be floating-point. Y coordinate of the new position.
Examples
To set Bill's position on the map to (145.6, 112.1):
SetPersonXYFloat("Bill", 145.6, 112.1);
Notes
- Like with SetPersonX() and SetPersonY(), calling this before MapEngine() may cause the map engine to override the position with the starting point. One solution is to queue the script command:
QueuePersonScript("Bill", "SetPersonXYFloat('Bill', 145.6, 112.1)", false);
- Using floating point numbers is helpful for persons with speeds that aren't simple integers. See GetPersonXFloat() and GetPersonYFloat().
See also
- GetPersonX()
- GetPersonY()
- GetPersonLayer()
- SetPersonX()
- SetPersonY()
- SetPersonLayer()
- MapEngine()