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 freefunction setTextPosHook(text)
if getObject("Conditions[hook_active]"):getBool(VConditionValue) then
if text:getLink(VTextOwner):getId().tableId == eCharacters then
if text:getLink(VTextOwner):getName() == "chicken" and game:getLink(VGameCurrentScene):getName() == "03_inside hut" then
text:setValue(VTextPosition, {x= game:getPoint(VGameWindowResolution).x/2, y=500})
end
end
end
return true
end
registerHookFunction("setTextPosition", "setTextPosHook")
verbstring = getObject("Values[verb]"):getStr(VValueString)
var obj = game:getLink(VGameCurrentObject)
if obj:getId().tableId == eCharacters then
...
elseif obj:getId().tableId == eObjects then
...
end
When you use getObject on the Conditions table, how do you know which conditions table this is?
The conditions tab within the active interface?, or the conditions specified on an object?.
This has puzzled me alot whilst trying to learn this? How do you target specific conditions on objects etc?
getObject("Conditions[condition_name]")
-- example 1: condition linked to a scene
getObject("Scenes[scene_name].SceneConditions[condition_name]")
-- example 2: condition linked to a scene object
getObject("Scenes[scene_name].SceneObjects[object_name].ObjectConditions[condition_name]")
And what is getLink actually doing (in laymans terms), and how does it differ from getLinks?
-- return current object underneath the mouse cursor...
game:getLink(VGameCurrentObject)
-- gets all texts associated with the current game object...
texts = game:getLink(VGameCurrentObject):getLinks(VTextAll)
entry1 = texts[1]:getStr(VTextLanguageText) -- gets text from first table entry
Sorry to ask such dumb fundamentals on this thread but i cant seem to find a decent explanation anywhere else?
-- return total amount of entries in x table...
print(table.maxn(table_name))
-- for i = 1 to table entry total value do....
for i = 1, table.maxn(t) do
if texts[i]:getLink(VTextLanguageLanguage) == game:getLink(VGameStandardLanguage):getName() then
texts:setValue(VTextLanguageText, "some new text here..."); break
end
end
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 your finished game there is Visionaire Studio PRO from €75 or the Indie Bundle for €99.
Until December 1: the Indie Bundle is 30% off with the code BLACKFRIDAY, €69.30 instead of €99.