User Tools

Site Tools


script:world_event:isdaytime

For example:

  • Parameters & Types: not
  • Return value and type:
    • code:number succeeded (ErrorCode.OK) ErrorCode
  • The main effect of the method: whether it is daytime or not
  • Specific use cases are as follows:

- Determine whether it is daytime now

local result=World:isDaytime()
if result == 0 then--if it is daytime
	Chat:sendSystemMsg("It's daytime!")
else--if it is not daytime
	Chat:sendSystemMsg("It's night!")
end

If you have any questions about Developer Tools, feel free to join our official discord server Mini World Global DEV discord

script/world_event/isdaytime.txt · Last modified: 2024/05/28 03:48 by don