This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
getObject("Characters[name]"):setValue(VCharacterName, "new name")
Create point and click adventures without coding. The free version covers up to 25 scenes per project. For more scenes or to earn money with your game, you need a license.
See the Indie Bundle Try it for freelocal texts -- empty variables
-- * function used to update name of specified object, character, etc * --
function setText(obj, txt)
texts = obj.TextTextLanguages
-- + --
for i = 1, #texts do
if texts[i].language == game.StandardLanguage:getId().id then
texts[i].text = txt; obj.TextTextLanguages = texts
break
end
end
end
-- shorthand (character)
setText( Characters["Tom"].CharacterName, "Tommy" )
-- longhand (character)
setText( getObject("Characters[Tom].CharacterName"), "Tommy" )
-- shorthand (object) [global linking]
setText( Objects["ball"].ObjectName, "football" )
-- shorthand (object) [direct linking] -- won't work in current public build
setText( game.CurrentScene.SceneObjects["ball"].ObjectName, "football" )
-- longhand (object) [global linking]
setText( getObject("Objects[ball].ObjectName"), "football" )
-- longhand (object) [direct linking]
setText( getObject("Game.GameCurrentScene.SceneObjects[ball].ObjectName"), "football" )
for i = 1, #texts do
if texts[i].language == game.StandardLanguage:getId().id then
texts[i].text = txt; obj.TextTextLanguages = texts