User Tools

Site Tools


script:ui_event:settexture

setTexture

  • Parameters & Types:
    • playerid: number player ID
    • uiid: string the UIID of the custom UI
    • elementid: the UIID of the string element
    • url: string image ID
  • Return value and type:
    • ErrorCode. OK
  • The main function of this method is to set the pattern texture of the image symbol
  • Specific use cases are as follows:
--This function is executed when the player clicks on the block
local function clickblock(event)
    local playerid=event.eventobjid--Click on the player's mini number of the block
    local uiid="6986982063319417057"--Interface ID
    local elementid="6986982063319417057_3"--Image component ID
    local url="10010"--The pattern id to be set
    --Set the pattern of the player's picture symbol
    Customui:setTexture(playerid, uiid, elementid, url)
end
ScriptSupportEvent:registerEvent([=[Player.ClickBlock]=], clickblock)
script/ui_event/settexture.txt · Last modified: 2024/06/11 02:22 by don