User Tools

Site Tools


developer_editor:script:updaterectangle

updateRectangle

  • Parameters & Types:
    • shapeid: number
    • sx: numberX coordinate value
    • sz: numberz coordinate value
    • w: numberX directional coordinate difference
    • h: the coordinate difference of the numberz direction
  • Return value and type:
    • ErrorCode. OK
  • The main purpose of this method is to update the shape (rectangle), pass in the starting coordinates and dimensions
  • Specific use cases are as follows:
--Set the shape with id 1 (only rectangle) to a rectangle with width and height of 1 and 1 starting from (0,0)
--The first parameter 1 is the rectangle shape id
--The second and third parameters 0,0 are the starting coordinates of the rectangle
--The last two parameters 1,1 are the width and height of the rectangle
MapMark:updateRectangle(1,0,0,1,1)
--Display in the chat box
Chat:sendSystemMsg("The rectangle with id 1 is set to start at (0,0) with width and height of 1 and 1 respectively")
developer_editor/script/updaterectangle.txt · Last modified: 2024/06/18 02:10 by don