Start all Timelines within a Group

I'm looking for a method to start all timelines within a specific group.

ex.  Start all timelines tagged as Group A.... in the same way that I can Release All Timelines within Group A.

My efforts via Lua scripting are clunky and populate my logs with garbage.  Anyone have a clever way to do it?

Parents
  • Scripting is your friend - though there is no clean way in the LUA API to see what timelines exist, so you will need to cycle through a relevant large number to find them.

    Create a startup script

    groupA ={} --a matrix with all group A timelines
    
    for i = 1, 20 do --for all timelines in your project
        if get_timeline(i) then --if a timeline with that number exists
            if get_timeline(i).group == "A" then --check if it belongs to group A
                groupA[#groupA+1] = i --add it's nubmer to the table
            end
        end
    end
    
    function StartA() --declares a function
        for i = 1, #groupA do --for all numbers in the group
            get_timeline(groupA[i]):start() --start the timeline
        end
    end


    and then as your action for the trigger needed  a script that runs the function
    StartA() --runs the function StartA

    Depending your project needs you might want to build a table for all groups, let me know if you need help with this.

Reply
  • Scripting is your friend - though there is no clean way in the LUA API to see what timelines exist, so you will need to cycle through a relevant large number to find them.

    Create a startup script

    groupA ={} --a matrix with all group A timelines
    
    for i = 1, 20 do --for all timelines in your project
        if get_timeline(i) then --if a timeline with that number exists
            if get_timeline(i).group == "A" then --check if it belongs to group A
                groupA[#groupA+1] = i --add it's nubmer to the table
            end
        end
    end
    
    function StartA() --declares a function
        for i = 1, #groupA do --for all numbers in the group
            get_timeline(groupA[i]):start() --start the timeline
        end
    end


    and then as your action for the trigger needed  a script that runs the function
    StartA() --runs the function StartA

    Depending your project needs you might want to build a table for all groups, let me know if you need help with this.

Children
Related