Skip to main content

windLines

windLines is a fork of boatbomber's wind lines module, however it is heavily refactored and has a few slight changes in behavior. Overall, it is a module for creating wind line effects.

windLines.onEffectStarted:Connect(function()
	print("WindLines effect started")
end)

windLines.onEffectStopped:Connect(function()
	print("WindLines effect stopped")
end)

windLines.start()

Types

WindLinesConfig

interface WindLinesConfig {
lifetimenumber?--

The life time of wind lines.

directionVector3?--

The direction of wind lines.

speednumber?--

The speed at which wind lines move.

spawnRatenumber?--

The rate at which wind lines are created.

raycastParamsRaycastParams?--

A RaycastParams object, to be used in determining if the player is under a roof or not.

}

This is a config template, none of these members are required in the config table when configuring windLines through windLines.setConfig, however the config table must not be empty!

DefaultWindLinesConfig

interface DefaultWindLinesConfig {
lifetime3
directionVector3.new(1,0,0)
speed6
spawnRate25
raycastParamsnil
}

This is the default config template that windLines initially uses. You can configure windLines through windLines.setConfig.

Properties

onEffectStarted

SignalRead only
windLines.onEffectStarted: Signal<>

A signal which is fired whenever the wind lines effect starts.

onEffectStopped

SignalRead only
windLines.onEffectStopped: Signal<>

A signal which is fired whenever the wind lines effect stops.

Functions

effectStarted

windLines.effectStarted() → boolean

Returns a boolean indicating if the wind lines effect is started.

started

windLines.started() → boolean

Returns a boolean indicating if windLines is started through windLines.start.

setConfig

windLines.setConfig(newConfigWindLinesConfig) → ()

Sets the current config of windLines to newConfig, so that this new config will be used for wind line effects.

start

windLines.start() → ()

Starts up the wind lines effect.

Custom behavior

If the player is standing under a roof, then the wind lines effect will be stopped for realism purposes and this behavior cannot be toggled. However, you can adjust this behavior through windLines.setConfig through the RaycastParams member, since ray casting is used in determining if the player is standing under a roof.

For e.g, the following config does not consider descendants in the filteredPartsFolder folder as roofs, so if a player stands under them, the wind lines effect will not be stopped:

local Workspace = game:GetService("Workspace")

local filteredPartsFolder = Workspace.SomeFolder
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {filteredPartsFolder} 

windLines.setConfig({raycastParams = raycastParams})
windLines.start()

stop

windLines.stop() → ()

Stops the wind lines effect.

Show raw api
{
    "functions": [
        {
            "name": "effectStarted",
            "desc": "Returns a boolean indicating if the wind lines **effect** is started.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 112,
                "path": "src/windLines/init.luau"
            }
        },
        {
            "name": "started",
            "desc": "Returns a boolean indicating if windLines is started through [windLines.start].",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 120,
                "path": "src/windLines/init.luau"
            }
        },
        {
            "name": "setConfig",
            "desc": "Sets the current config of windLines to `newConfig`, so that this new config will be used for wind line effects.",
            "params": [
                {
                    "name": "newConfig",
                    "desc": "",
                    "lua_type": "WindLinesConfig"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 130,
                "path": "src/windLines/init.luau"
            }
        },
        {
            "name": "start",
            "desc": "Starts up the wind lines effect.\n\n:::tip Custom behavior \nIf the player is standing under a roof, then the wind lines effect will be stopped for realism purposes and this\nbehavior cannot be toggled. However, you can adjust this behavior through [windLines.setConfig] through the \n[RaycastParams](https://create.roblox.com/docs/reference/engine/datatypes/RaycastParams) member, since ray casting \nis used in determining if the player is standing under a roof. \n\nFor e.g, the following config does not consider descendants in the `filteredPartsFolder` folder as roofs, \nso if a player stands under them, the wind lines effect will not be stopped:\n\n```lua\nlocal Workspace = game:GetService(\"Workspace\")\n\nlocal filteredPartsFolder = Workspace.SomeFolder\nlocal raycastParams = RaycastParams.new()\nraycastParams.FilterDescendantsInstances = {filteredPartsFolder} \n\nwindLines.setConfig({raycastParams = raycastParams})\nwindLines.start()\n```\n:::",
            "params": [],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 164,
                "path": "src/windLines/init.luau"
            }
        },
        {
            "name": "stop",
            "desc": "Stops the wind lines effect.",
            "params": [],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 191,
                "path": "src/windLines/init.luau"
            }
        }
    ],
    "properties": [
        {
            "name": "onEffectStarted",
            "desc": " \nA [signal](https://sleitnick.github.io/RbxUtil/api/Signal/) which is fired whenever the wind lines effect starts.",
            "lua_type": "Signal <>",
            "tags": [
                "Signal",
                "Read only"
            ],
            "source": {
                "line": 54,
                "path": "src/windLines/init.luau"
            }
        },
        {
            "name": "onEffectStopped",
            "desc": " \nA [signal](https://sleitnick.github.io/RbxUtil/api/Signal/) which is fired whenever the wind lines effect stops.",
            "lua_type": "Signal <>",
            "tags": [
                "Signal",
                "Read only"
            ],
            "source": {
                "line": 62,
                "path": "src/windLines/init.luau"
            }
        }
    ],
    "types": [
        {
            "name": "WindLinesConfig",
            "desc": "This is a config template, none of these members are required in the config table when configuring windLines through [windLines.setConfig], however\nthe config table must not be empty!",
            "fields": [
                {
                    "name": "lifetime",
                    "lua_type": "number?",
                    "desc": "The life time of wind lines."
                },
                {
                    "name": "direction",
                    "lua_type": "Vector3?",
                    "desc": "The direction of wind lines."
                },
                {
                    "name": "speed",
                    "lua_type": "number?",
                    "desc": "The speed at which wind lines move."
                },
                {
                    "name": "spawnRate",
                    "lua_type": "number?",
                    "desc": "The rate at which wind lines are created."
                },
                {
                    "name": "raycastParams",
                    "lua_type": "RaycastParams?",
                    "desc": "A `RaycastParams` object, to be used in determining if the player is under a roof or not."
                }
            ],
            "source": {
                "line": 15,
                "path": "src/windLines/init.luau"
            }
        },
        {
            "name": "DefaultWindLinesConfig",
            "desc": "This is the **default** config template that windLines initially uses. You can configure windLines through [windLines.setConfig].",
            "fields": [
                {
                    "name": "lifetime",
                    "lua_type": "3",
                    "desc": ""
                },
                {
                    "name": "direction",
                    "lua_type": "Vector3.new(1, 0, 0)",
                    "desc": ""
                },
                {
                    "name": "speed",
                    "lua_type": "6",
                    "desc": ""
                },
                {
                    "name": "spawnRate",
                    "lua_type": "25",
                    "desc": ""
                },
                {
                    "name": "raycastParams",
                    "lua_type": "nil",
                    "desc": ""
                }
            ],
            "source": {
                "line": 27,
                "path": "src/windLines/init.luau"
            }
        }
    ],
    "name": "windLines",
    "desc": " \n\nwindLines is a fork of boatbomber's wind lines module, however it is heavily refactored and has a few slight changes \nin behavior. Overall, it is a module for creating wind line effects.\n\n```lua\nwindLines.onEffectStarted:Connect(function()\n\tprint(\"WindLines effect started\")\nend)\n\nwindLines.onEffectStopped:Connect(function()\n\tprint(\"WindLines effect stopped\")\nend)\n\nwindLines.start()\n```",
    "source": {
        "line": 46,
        "path": "src/windLines/init.luau"
    }
}