This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
-- List of stuff to say over and over again
local closetSpeech = {
"Help I'm locked in the closet",
"Please let me out",
"You can't do this to me",
"Why won't anyone help me?",
"When I get out of hear you'll be sorry"
}
-- always loop and say this stuff.
while (true) do
for i = 1, #closetSpeech, 1 do
-- Trying to display object text using lua
--Scenes["Office"].SceneObjects["Closet"].ActiveText.TextCurrentText = closetSpeech[i]
--pause for x milliseconds or seconds
-- not sure how to pause with lua
end
end
--[[
-- want a function that will disable/hide or enable/show object text
-- depending on if it is shown/hidden already.
function ChangeClosetTextStatus()
if Scenes["Office"].SceneObjects["Closet"].ActiveText.TextActive == true then
Scenes["Office"].SceneObjects["Closet"].ActiveText.TextActive = false
else
Scenes["Office"].SceneObjects["Closet"].ActiveText.TextActive = true
end
end
]]The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.Until 1 Dec 2026 all licenses are 30 % off, for example the Indie Bundle for €69.30 instead of €99. The code BLACKFRIDAY is applied automatically at checkout.
See licenses Try it for freeChangeClosetText(Closet) -- closet is the Object Name-- Definition script
registerHookFunction("setTextPosition", "ChangeClosetText")
registerEventHandler("textStarted", "ChangeClosetText")
function ChangeClosetText(text)
text:setValue(ClosetSpeechText, "Please Let Me Out")
endprint(Values["ClosetSpeechText"].String)object (-1,-1) the string stuff seems to be correct by you.Yes it's likely the print() function messing up that script as print should be in lowercase & you are also calling something that doesn't exist. Have you actually created a value somewhere in the editor called ClosetSpeechText?Maybe the script is failing because of your "print":It tries to print a lua value "ClosetSpeechText", which doesn't exist (or does it elsewhere?)try either to save your VS-value saving in a lua variable or just print the whole declaration:print(Values["ClosetSpeechText"].String)also i am not sure if your Print needs to be lowercase...Another thing what seems a bit odd is that the console saysobject (-1,-1)which is not a typical table id nor an object id... As far as i know the object table id is "6" and the specific objects in this table has to be >= 1 ... Maybe your object is defect (?)In VS5 you can rightclick your scene object and choose "copy id" which you can paste inside a text editor for example... should be something like (6,somenumber)
Scenes["example"].SceneValues["example"].String = "hello world"This 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.
Through December 1: all licenses 30% off, for example the Indie Bundle for €69.30 instead of €99. Applied automatically at checkout.