User Tools

Site Tools


script:world_event:randomsoundid

randomSoundID

  • Parameters and types: None
  • Return value and type:
    • code: numberSuccess (ErrorCode.OK) ErrorCode
    • soundid: numbersound ID
  • The main function of this method is to: Randomly generate a sound effect ID
  • The specific use cases are as follows:
local code, soundid = World:randomSoundID()
if code == ErrorCode.OK then
print('Execution successful', code, soundid )
else
print('Execution failed')
end 
script/world_event/randomsoundid.txt · Last modified: 2024/06/09 09:37 by don