User Tools

Site Tools


developer_center:developer_editor:script:area_event

Area Class

Class For Area Interface

Return To Previous Page


API list

Class:apiName(parameters) Return Description
Area:createAreaRect(pos:table, dim:table) ErrorCode.OK _ areaaid:number Create a rectangular area
Area:createAreaRectByRange(posBeg:table, posEnd:table) ErrorCode.OK _ areaaid:number Create a rectangular area (by range)
Area:destroyArea(areaaid:number) ErrorCode.OK _ Destroy the area
Area:getAreaByPos(pos:table) ErrorCode.OK _ areaaid:number Find the area by location
Area:offsetArea(areaaid:number, x:number, y:number, z:number) ErrorCode.OK _ Area offset
Area:expandArea(areaaid:number, x:number, y:number, z:number) ErrorCode.OK _ Expand the area
Area:getAreaCenter(areaaid:number) ErrorCode.OK _ pos:table Obtain the middle point of the area
Area:getAreaRectLength(areaaid:number) ErrorCode.OK _ x:number, y:number, z:number Get the length of each side of the area
Area:getAreaRectRange(areaaid:number) ErrorCode.OK _ posBeg:table, posEnd:table Obtain the area range
Area:getRandomPos(areaaid:number) ErrorCode.OK _ pos:table Get a random position in the area
Area:objInArea(areaaid:number, objid:number) ErrorCode.OK _ Detect whether obj is in the area
Area:blockInArea(areaaid:number, blockid:number) ErrorCode.OK _ Detect whether there is a certain square in the area
Area:posInArea(pos:table, areaaid:number) ErrorCode.OK _ Whether the location is within the area
Area:getAreaPlayers(areaaid:number) ErrorCode.OK _ player list:table Get all players in the area
Area:getAreaCreatures(areaaid:number) ErrorCode.OK _ creature list:table Get all creatures in the area
Area:fillBlock(areaaid:number, blockid:number, face:number) ErrorCode.OK _ Fill the area with squares
Area:clearAllBlock(areaaid:number, blockid:number) ErrorCode.OK _ Clear all the squares in the area
Area:cloneArea(areaaid:number, deststartpos:table) ErrorCode.OK _ Copy the squares in the area to another area
Area:getPosOffset(srcpos:table, dim:table) ErrorCode.OK _ pos:table Get the added position
Area:replaceAreaBlock(areaaid:number, srcblockid:number, destblockid:number, face:number) ErrorCode.OK _ Replace the block type with a new block type
Area:blockInAreaRange(blockid:number, posbeg:table, posend:table) ErrorCode.OK _ There are squares in the area
Area:getAllObjsInAreaRange(posbegin:table, posend:table, objtype:number) ErrorCode.OK _ objids:table Get all objects within the area
Area:getAllObjsInAreaRangeByObjTypes(posbegin:table, posend:table, objtypes:table) ErrorCode.OK _ objids:table Get all objects within the area
Area:getAllPlayersInAreaRange(posbegin:table, posend:table) ErrorCode.OK _ objids:table Get all players in the area
Area:getAllCreaturesInAreaRange(posbegin:table, posend:table) ErrorCode.OK _ objids:table Get all creatures in the area
Area:fillBlockAreaRange(posbeg:table, posend:table, blockid:number, face:number) ErrorCode.OK _ Fill the area with squares
Area:clearAllBlockAreaRange(posbeg:table, posend:table, blockid:number) ErrorCode.OK _ Clear the squares in the area
Area:cloneAreaRange(posbeg:table, posend:table, deststartpos:table) ErrorCode.OK _ Copy the squares in the area to another area
Area:replaceAreaRangeBlock(posbeg:table, posend:table, srcblockid:number, destblockid:number, face:number) ErrorCode.OK _ Replace the area range square
Area:destroyBlockAreaRange(posbeg:table, posend:table, blockid:number) ErrorCode.OK _ Destroy the area range block
developer_center/developer_editor/script/area_event.txt · Last modified: 2023/07/18 06:36 by hhuxx1