Modding Help Can't Make Use of world.skyTime

Discussion in 'Starbound Modding' started by aethercowboy, Sep 21, 2016.

Tags:
  1. aethercowboy

    aethercowboy Yeah, You!

    I'm trying to make use of the newly documented (1.1.1) Lua commands in a script, but whenever I use world.skyTime I get the following error:

    Code:
    attempt to call a nil value (field 'skyTime')
    I'm doing the following:

    Code:
    function update(dt)
      if world ~= nil then
        -- ...
        skyTime = world.skyTime()
        -- ...
      end
    end
    My client is running 1.1.1, and I'm fairly confident that none of the mods I'm currently using are affecting this.

    Is this a bug, or am I just doing something wrong? Thanks.
     
    Last edited: Sep 21, 2016
  2. Iris Blanche

    Iris Blanche Pudding Paradox Forum Moderator

    It's in the section for serverside scripts only. Do you want to get the current time on the planet? If yes i suggest using world.timeOfDay() because this can also be used clientside.

    ~ Iris ~
     
  3. aethercowboy

    aethercowboy Yeah, You!

    Server Side... That would explain it. Thanks.

    I was actually trying to find a way to use Lua to change the time of day, and since there was a corresponding setSkyTime I was hoping that would be it. :(

    Back to the drawing board...
     

Share This Page