Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Wind extractor

From Fightorder

Read the wind speed and direction from the map randomiser

the battle seting or map maker define a wind minimal and maximal speed

so when the values are not equal its a gambling

and generaly this values is used for being converted in energy by "elolienne"

(seem english not use them...)

winddirX,winddirY,winddirZ,windstrength,windnormDirX,windnormDirY,windnormDirZ=Spring.GetWind()
rotorspeed=windstrength/5
Spring.UnitScript.Spin(rotor,z_axis,rotorspeed,0.3)
windradian=Spring.GetHeadingFromVector(windnormDirX,windnormDirZ)
Turn(turet,y_axis,windradian,rotorspeed)

  • because windspeed is from 1 to 99 is often needed to divide it
  • because the wind direction is gived as vector it must be converted in radian for turet direction