Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Rename this file and put it there:
- -- addons/<your pack's addon name>/lua/subtitles/<your pack name>.lua
- local barney_col = Color(126, 192, 255) -- It is advised to save reused colors in a local variable instead of declaring it every time in a table to save function calls.
- -- Table with captions
- local subtable = {
- -- Regular captions:
- {
- snd = "SIMPLEST_SUBTITLE_TEST_1", -- Path to sound file, name of soundscipt or sentence name (from sentences.txt). Required.
- subject = "Unknown creature", -- The name whoever says the line. Optional.
- text = "*distant howling*",-- The caption. Required (obviously!!)
- range = 512, -- Maximum distance (in Hammer Units) from the source for subtitle to work. Optional.
- duration = 3, -- How long the caption is shown for. Optional, defaults to 5
- closedcaption = false, -- Should the caption only be shown when full closed captions are enabled? Optional, defaults to false
- subjectcol = Color(255,255,255,255), -- Color of the subject. Optional, defaults to white
- textcol = Color(255,255,255,255) -- Color of the caption. Optional, defaults to white
- },
- -- Chaining example:
- {
- snd = "BA_DESK",
- text = "Hey, Mr. Freeman! I had a bunch of messages for you, but we had a system crash about 20 minutes ago and I'm still trying to find my files. Just one of those days, I guess...",
- duration = 8.5,
- textcol = barney_col,
- chain = "BA_DESK_PT2" -- Shows the BA_DESK_PT2 caption after this caption fades away (duration, 8.5 seconds)
- },
- {
- snd = "BA_DESK_PT2",
- text = "They were having some problems down in the test chamber, too, but I think that's all straightened out. They told me to make sure you headed down there as soon as you got into your hazard suit.",
- duration = 8.2,
- textcol = barney_col
- },
- {
- snd = "SIMPLEST_SUBTITLE_TEST_2",
- subject = "World",
- text = "Null",
- range = 512,
- duration = 3,
- closedcaption = false,
- subjectcol = Color(255,255,255,255),
- textcol = Color(255,255,255,255)
- },
- {
- snd = "SIMPLEST_SUBTITLE_TEST_3",
- text = "*EXPLOSION*",
- range = 512,
- duration = 4,
- closedcaption = true,
- textcol = Color(255,25,25,255)
- },
- {
- snd = "SIMPLEST_SUBTITLE_TEST_4",
- subject = "G-Man:",
- text = "Doctorrr freeeemaaaan \nSeems like you only just arrived",
- range = 512,
- duration = 5,
- closedcaption = false,
- subjectcol = Color(25,25,255,255),
- textcol = Color(255,255,255,255)
- },
- {
- snd = "SIMPLEST_SUBTITLE_TEST_5",
- subject = "M4-Sopmod II:",
- text = "*japanese talk* Shkikan *japanese talk*",
- range = 512,
- duration = 5,
- closedcaption = false,
- subjectcol = Color(25,255,25,255),
- textcol = Color(255,255,255,255)
- },
- }
- -- !!! DO NOT TOUCH BELOW THIS LINE !!!
- table.insert(Subtitles_Table, subtable) -- Do not delete this line, it appends the table above to the list of registered captions.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement