User Tools

Site Tools


developer_editor:script:updateline

updateLine

  • Parameters & Types:
    • shapeid:number
    • sx:number
    • sz:number
    • ex:number
    • ez:number
  • Return value and type:
  • ErrorCode. OK
  • The main purpose of this method is to update the shape (linear) and pass in the start and end coordinates
  • Specific use cases are as follows:
--Set the shape with id 1 (can only be a straight line) from (0,0) to (1,1)
--The first parameter 1 is the straight line shape id
--The second and third parameters 0,0 are the straight line start coordinates
--The last two parameters 1,1 are the straight line end coordinates
MapMark:updateLine(1,0,0,1,1)
--Display in the chat box
Chat:sendSystemMsg("The straight line with id 1 is set from (0,0) to (1,1)")
developer_editor/script/updateline.txt · Last modified: 2024/06/18 02:09 by don