function init()
    button = FindShape("button")
    SetTag(button, "interact", "loc@ACTIVATE_DEMO")
    objects = FindShapes("obj")
    activated = false
end

function tick()
    if InputPressed("interact") and GetPlayerInteractShape() == button and not activated then
        activate()
    end
end

function activate()    
    RemoveTag(button, "interact")
    local t = GetShapeLocalTransform(button)
    t.pos[2] = t.pos[2]-0.1
    SetShapeLocalTransform(button, t)

    activated = true
    for i=1,#objects do
        local object = objects[i]
        local body = GetShapeBody(object)
        ApplyBodyImpulse(body, Vec(0,0,0), Vec(0,0.01,0))
    end
end