Show raw api
{
"functions": [
{
"name": "new",
"desc": "Default constructor",
"params": [
{
"name": "movementSoundPlugin",
"desc": "",
"lua_type": "RideMovementSoundPlugin"
},
{
"name": "animationSectionRanges",
"desc": "",
"lua_type": "AnimationSectionRanges"
},
{
"name": "staticAnimations",
"desc": "",
"lua_type": "{ string }?\n"
}
],
"returns": [
{
"desc": "",
"lua_type": "RideSectionSoundPlugin"
}
],
"function_type": "static",
"tags": [
"Constructor"
],
"source": {
"line": 78,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
},
{
"name": "extractRangesFromAnimation",
"desc": "Extracts the ranges for an animation.",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Result<{SectionRange}, string>"
}
],
"function_type": "static",
"tags": [
"Static"
],
"source": {
"line": 118,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
},
{
"name": "getSectionRanges",
"desc": "Extracts ranges from a map of animations in a RideManager.",
"params": [
{
"name": "rideManager",
"desc": "",
"lua_type": "RideManager"
},
{
"name": "animationList",
"desc": "",
"lua_type": "{string}"
},
{
"name": "startTriggerName",
"desc": "",
"lua_type": "string"
},
{
"name": "endTriggerName",
"desc": "",
"lua_type": "string"
}
],
"returns": [
{
"desc": "",
"lua_type": "Result<AnimationSectionRanges, string>"
}
],
"function_type": "static",
"tags": [
"Static"
],
"source": {
"line": 216,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
},
{
"name": "create",
"desc": "Create constructor.\n\nCreates a RideSectionSoundPlugin by extracting ranges from Animation using triggers.",
"params": [
{
"name": "movementSoundPlugin",
"desc": "",
"lua_type": "RideMovementSoundPlugin"
},
{
"name": "rideManager",
"desc": "",
"lua_type": "RideManager"
},
{
"name": "animationTriggerData",
"desc": "",
"lua_type": "{[string]: CreateAnimationData}"
}
],
"returns": [
{
"desc": "",
"lua_type": "Result<RideSectionSoundPlugin, string>"
}
],
"function_type": "static",
"tags": [
"Constructor"
],
"source": {
"line": 272,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
},
{
"name": "fromRideManager",
"desc": "Constructs a RideSectionSoundPlugin by looking through all of the registered animations of the given RideManager\nand extracting ranges with the given triggers.\n\nThis is designed to be a quick and easy constructor.",
"params": [
{
"name": "movementSoundPlugin",
"desc": "",
"lua_type": "RideMovementSoundPlugin"
},
{
"name": "rideManager",
"desc": "",
"lua_type": "RideManager"
},
{
"name": "startTriggerName",
"desc": "",
"lua_type": "string"
},
{
"name": "endTriggerName",
"desc": "",
"lua_type": "string"
},
{
"name": "staticAnimations",
"desc": "",
"lua_type": "{string}?"
}
],
"returns": [
{
"desc": "",
"lua_type": "Result<RideSectionSoundPlugin, string>"
}
],
"function_type": "static",
"tags": [
"Constructor"
],
"source": {
"line": 325,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
},
{
"name": "fromTriggers",
"desc": "Constructs a RideSectionSoundPlugin by extracting ranges using the following triggers",
"params": [
{
"name": "movementSoundPlugin",
"desc": "",
"lua_type": "RideMovementSoundPlugin"
},
{
"name": "rideManager",
"desc": "",
"lua_type": "RideManager"
},
{
"name": "animationList",
"desc": "",
"lua_type": "{string}"
},
{
"name": "startTriggerName",
"desc": "",
"lua_type": "string"
},
{
"name": "endTriggerName",
"desc": "",
"lua_type": "string"
},
{
"name": "staticAnimations",
"desc": "",
"lua_type": "{ string }?\n"
}
],
"returns": [
{
"desc": "",
"lua_type": "Result<RideSectionSoundPlugin, string>"
}
],
"function_type": "static",
"tags": [
"Constructor"
],
"source": {
"line": 358,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
},
{
"name": "isEnabled",
"desc": "Returns true if this plugin is currently enabled",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "boolean"
}
],
"function_type": "method",
"source": {
"line": 380,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
},
{
"name": "setIsEnabled",
"desc": "Sets whether the plugin is enabled or disabled.\nWhile disabled, the movement sound will not play.",
"params": [
{
"name": "value",
"desc": "",
"lua_type": "boolean"
}
],
"returns": [],
"function_type": "method",
"source": {
"line": 387,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
},
{
"name": "_isInSection",
"desc": "Returns true if animationPlayer",
"params": [
{
"name": "animationName",
"desc": "",
"lua_type": "string"
},
{
"name": "t",
"desc": "",
"lua_type": "number"
}
],
"returns": [
{
"desc": "",
"lua_type": "boolean"
}
],
"function_type": "method",
"private": true,
"source": {
"line": 406,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
},
{
"name": "isInSection",
"desc": "Returns true if the animationPlayer is in a section",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "boolean"
}
],
"function_type": "method",
"source": {
"line": 430,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
},
{
"name": "update",
"desc": "Updates this plugin",
"params": [],
"returns": [],
"function_type": "method",
"source": {
"line": 440,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
}
],
"properties": [],
"types": [
{
"name": "SectionRange",
"desc": "",
"fields": [
{
"name": "start",
"lua_type": "number",
"desc": ""
},
{
"name": "stop",
"lua_type": "number",
"desc": ""
}
],
"source": {
"line": 66,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
},
{
"name": "AnimationSectionRanges",
"desc": "",
"lua_type": "{[string]: {SectionRange}}",
"source": {
"line": 73,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
},
{
"name": "CreateRangeInfo",
"desc": "",
"fields": [
{
"name": "startTrigger",
"lua_type": "string",
"desc": ""
},
{
"name": "stopTrigger",
"lua_type": "string",
"desc": ""
}
],
"source": {
"line": 252,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
},
{
"name": "CreateAnimationData",
"desc": "",
"lua_type": "CreateRangeInfo | true",
"source": {
"line": 259,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
}
],
"name": "RideSectionSoundPlugin",
"desc": "Plays a sound when the ride enters a section of the ride indicated by a range in an animation.\n\nThis is can be used to setup lift anti-rollback sounds for a coaster, sounds that only play when a coaster train is in a certain section of the ride.\n\nStatic Animations are animations where this plugin is *ALWAYS* enabled.\n\n#### Setup\n\n```lua\n-- create MovementSoundPlugin\nlocal movementSoundPlugin = RideMovementSoundPlugin.new(animPlayer, {\n\tfolderName = \"MovementSounds\",\n\tsoundProperties = {\n\t\t-- overwrite properties of Sound\n\t\tSoundId = \"rbxassetid://0000\", -- set sound id here\n\t},\n\n\tuseConstantSpeed = true,\n\tmaxSpeed = 10.0,\n\tminSpeed = 0,\n\n\tmaxVolume = 1.5,\n\tminVolume = 0.0,\n\tmaxPitch = 1.0,\n\tminPitch = 0.5,\n\n\tfadeInTime = 2,\n\tfadeInStyle = Enum.EasingStyle.Quint,\n\tfadeOutTime = 2,\n\tfadeOutStyle = Enum.EasingStyle.Quint,\n})\n\n-- create section sound plugin\nlocal sectionSoundPlugin = RideSectionSoundPlugin.create(\n\tmovementSoundPlugin,\n\trideManager,\n\t{\n\t\t[\"RideAnimation\"] = {\n\t\t\t{\n\t\t\t\tstartTrigger = \"Lift_SECTION_START\",\n\t\t\t\tendTrigger = \"Lift_SECTION_END\",\n\t\t\t}\n\t\t}\n\t}\n):unwrap()\n```",
"source": {
"line": 57,
"path": "src/shared/plugins/rideMovementSound/RideSectionSoundPlugin.lua"
}
}