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? Code: require "/scripts/vec2.lua" function init() self.windSensorPosition = vec2.add(object.position(), config.getParameter("windSensorPosition")) end function update(dt) if (world.windLevel(self.windSensorPosition)) < 1 object.setConfigParameter("animationCycle", 1) else object.setConfigParameter("animationCycle", (world.windLevel(self.windSensorPosition))) end end
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.