script:world_event:getrangexz
getRangeXZ
- Parameters and types: None
- Return value and type:
- code: numberSuccess (ErrorCode.OK) ErrorCode
- startX: numberstarting X coordinate
- startZ: numberstarting Z coordinate
- endX: numberEnd X coordinate
- endZ: numberend Z coordinate
- The main function of this method is to get the chunk range and return the start and end positions of the chunk.
- The specific use cases are as follows:
- - Get chunk range
local result,startX,startZ,endX,endZ=World:getRangeXZ() Chat:sendSystemMsg("Block start horizontal coordinate:"..startX) Chat:sendSystemMsg("Block start vertical coordinate:"..startZ) Chat:sendSystemMsg("Block end horizontal coordinate:"..endX) Chat:sendSystemMsg("Block end vertical coordinate:"..endZ)
script/world_event/getrangexz.txt · Last modified: 2024/06/04 03:51 by don