This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
local verbcoin = getObject("Interfaces[Verbalmünze]")
local Erlene = getObject("Characters[Erlene]")
if not game.CurrentScene.SceneIsMenu then
--if CURRENT OBJECT == SCENE OBJECT OR CHARACTER (How do I get this?)
if string.find(getObject("Game.GameCurrentObject"):getName(), "Gen_") then
game:clearLink(GameCurrentObject)
game:clearLink(GameActiveCommand)
else
-- IF ITEM IS ~NOT~ BEING DRAGGED -- NOT SURE IT WORKS:
if game.UsedItem:isEmpty() then
Erlene:setValue(VCharacterState, 2)
verbcoin:setValue(VInterfaceVisible, 1)
verbcoin:setValue(VInterfaceTimeToDestVisibility, 100)
verbcoin:setValue(VInterfaceDestVisibility, 100)
else -- IF ITEM ~IS~ BEING DRAGGED -- DOESN'T WORK!
verbcoin:setValue(VInterfaceVisible, 0)
end
end
--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 freeif game.CurrentObject:getId().tableId == eObjects or game.CurrentObject:getId().tableId == eCharacters then
...
end
local itm = nil
function item_used()
if not game.UsedItem:isEmpty() then
if game.UsedItem:getName() ~= itm then
itm = game.UsedItem:getName();
Conditions["item_used"].ConditionValue = true --maybe setalso a condition to true. just in case you need it inside your visionaire action parts
end
elseif game.UsedItem:isEmpty() and itm ~= nil then
itm = nil;
Conditions["item_used"].ConditionValue = false
end
end
registerEventHandler("mainLoop", "item_used")
PS: wir können hier auch gerne in Deutsch weiterreden![]()
the saved object doesnt get cleared
Can you post your recent script and also screenshots from you configured action parts?
local verbcoin = getObject("Interfaces[Verbalmünze]")
local Erlene = getObject("Characters[Erlene]")
local act_save_object = getObject("Actions[SaveObj]")
--local act_delete_object = getObject("Actions[DeleteObj]")
if not game.CurrentScene.SceneIsMenu then
if game.CurrentObject:getId().tableId == eObjects
or game.CurrentObject:getId().tableId == eCharacters then
if not string.find(getObject("Game.GameCurrentObject"):getName(), "Gen_") then
if not getObject("Conditions[drag_item]"):getBool(VConditionValue) then
startAction(act_save_object);
Erlene:setValue(VCharacterState, 2);
verbcoin:setValue(VInterfaceVisible, 1);
verbcoin:setValue(VInterfaceTimeToDestVisibility, 100);
verbcoin:setValue(VInterfaceDestVisibility, 100);
else
Erlene:setValue(VCharacterState, 2);
game:clearLink(VGameUsedItem);
end
else
if getObject("Conditions[drag_item]"):getBool(VConditionValue) then
Erlene:setValue(VCharacterState, 2);
game:clearLink(VGameUsedItem);
end
end
end
end