This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
function Main.hideInventory()
if inventoryOpen == true then
local inventory = getObject("Interfaces[inventory]")
inventory:to(inventoryTransitionDuration, {InterfaceVisibility = 0})
-- this needs to be done in oncomplete
-- inventory.InterfaceVisible = false
inventoryOpen = false
end
end
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 freeInterfaces["inventory"].InterfaceVisible = false
inventoryOpen = falsefunction Main.hideInventory()
if inventoryOpen == true then
local inventory = Interfaces["inventory"]
inventory:to(inventoryTransitionDuration, {InterfaceVisibility = 0})
startAction(Actions["hide_inventory"]) -- call the called by other action that handles when to hide the inventory
end
endfunction Main.hideInventory()
if inventoryOpen == true then
local inventory = getObject("Interfaces[inventory]")
inventory:to(inventoryTransitionDuration, {InterfaceVisibility = 0})
-- this needs to be done in oncomplete
setDelay(inventoryTransitionDuration, function()
inventory.InterfaceVisible = false
end)
inventoryOpen = false
end
endsetDelay(inventoryTransitionDuration, function()
if not Conditions["example"].ConditionValue then
inventory.InterfaceVisible = false
end
end)