Modding Help animationCycle Variation in Lua (help me)

Discussion in 'Starbound Modding' started by Lemon drops, Sep 26, 2021.

  1. Lemon drops

    Lemon drops Pangalactic Porcupine

    I am trying to make a mod that changes the animationCycle rate based on wind speed. What am I doing wrong?

    If the lua is correct, how do I implement it into an object so that it actually works?

    require "/scripts/vec2.lua"
    function init()
      self.windSensorPosition = vec2.add(object.position(), config.getParameter("windSensorPosition"))
    function update(dt)
      if (world.windLevel(self.windSensorPosition)) < 1
      object.setConfigParameter("animationCycle", 1)
      object.setConfigParameter("animationCycle", (world.windLevel(self.windSensorPosition)))
  2. That1Rand0mChannel

    That1Rand0mChannel Industrial Terraformer

    There's a windmill object that can be found in novakid villages, it seems to be based on the wind speed of the current planet it's on. I'm afraid that's the closest you can get.

Share This Page