This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license. Forum readers get the Indie Bundle 15 % off with the code FORUM15: €84.15 instead of €99, valid until 31 Dec 2026.Black Friday: the Indie Bundle is 30 % off until 1 Dec 2026, €69.30 instead of €99. The code BLACKFRIDAY is already applied.
Get 15 % off Try it for free--[[
Kill background text (multiple options) [v5] (27/06/2022)
Written by AFRLme [Lee Clarke]
-- + --
https://afrl.me | afrlme@outlook.com
-- + --
This script is donation optional. In game credit is non-negotiable.
You are free to: ¹ use it in your game(s). ² modify the script.
Do not remove - or edit - this comment block.
--]]
-- * tables * --
txt = {} -- create table
txt["_temporary_"] = "" -- set table as temporary
-- * function which kills active background text (1 = all, 2 = all characters, 3 = current character, 4 = narration texts) * --
function killText(val)
for i = #txt, 1, -1 do
if val == 1 and txt[i].Active then txt[i].Active = false; table.remove(txt, i) -- all background text (both character &; narration)
elseif val == 2 and txt[i].Active and txt[i].Owner:getId().tableId == eCharacters then txt[i].Active = false; table.remove(txt, i) -- all character background text
elseif val == 3 and txt[i].Active and txt[i].Owner == game.CurrentCharacter then txt[i].Active = false; table.remove(txt, i) -- current character background text
elseif val == 4 and txt[i].Active and txt[i].Owner:isEmpty() then txt[i].Active = false; table.remove(txt, i) -- narration background text
end
end
end
-- * on text display function * --
function sText(text)
if text.Background then table.insert(txt, text) end
end
-- * function for text finished * --
function eText(text)
if text.Background and #txt > 0 then
for i = #txt, 1, -1 do if text == txt[i] then table.remove(txt, i) end end
end
end
-- * event handlers * --
registerEventHandler("textStarted", "sText") -- event handler for begin text
registerEventHandler("textStopped", "eText") -- event handler for end textThis thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.
New threadDeponia, The Whispered World and more than 160 other games were made with Visionaire Studio. The free version covers up to 25 scenes. For more scenes there is Visionaire Studio PRO from €75, and to sell your game the Indie Bundle for €99.
Until December 1: the Indie Bundle is 30% off with the code BLACKFRIDAY, €69.30 instead of €99.