This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
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 free Objects["Brick_1"].RotationCenter = {x=100, y=150} Objects["name of the object"] to:(delay, {affected field}, easing) Objects["Brick_1"] to:(500, {Rotation = Objects["Brick_1"].Rotation + math.rad(90)}, easeQuadOut) local t_brick_rv = {90, 90, 45, 90, 180, 270, 90, 90} - rotation values (need to be in order)
function checkBrickSolved()
for i = 1, #t_brick_rv do
if math.deg(Objects["brick_" .. i].Rotation) ~= t_brick_rv[i] then return false end
if i == #t_brick_rv and math.deg(Objects["brick_" .. i].Rotation) == t_brick_rv[i] then Conditions["brick_solved"].Value = true end
end
endset value "bricks_correct" to 0.It's very crude, for me at least as I tend to use scripting solutions for most things & try to reduce the amount of action parts I need to use because for me personally scripting is just faster than clicking around the editor.
if values "brick1" is 2
set value "bricks_correct" + 1
end if
if values "brick2" is 1
set value "bricks_correct" + 1
end if
if values "brick3" is 4
set value "bricks_correct" + 1
end if
... etc
if value "bricks_correct" equals 9 -- whatever total amount of bricks is
call action "brick_puzzle_solved"
end if