GSE: Sequences, Variables, Macros

GSE: Sequences, Variables, Macros

6M Downloads

[ENH] Allow access to loop index value with action blocks

TimothyLuke opened this issue ยท 1 comments

commented

Discussed in #1130

Originally posted by marantis June 10, 2022
Does exist the possibility to get the index value in a loop? I've found nothing in the Wiki.

I like to replace this code ...

{
    ["Variables"] = {
    },
    ["Actions"] = {
        [1] = {
            [1] = "/cast [@raid1] Power Word: Shield",
            ["Type"] = "Action"
        },
        [2] = {
            [1] = "/cast [@raid2] Power Word: Shield",
            ["Type"] = "Action"
        },
        [3] = {
            [1] = "/cast [@raid3] Power Word: Shield",
            ["Type"] = "Action"
        },
        [4] = {
            [1] = "/cast [@player] Power Word: Shield",
            ["Type"] = "Action"
        }
    },
    ["InbuiltVariables"] = {
    }
}

... with a code like this ...

{
    ["Variables"] = {
    },
    ["Actions"] = {
        [1] = {
            [1] = {
                [1] = "/cast [@raid~~LOOPIDX~~] Power Word: Shield",
                ["Type"] = "Action"
            },
            ["Type"] = "Loop",
            ["Repeat"] = 3,
            ["StepFunction"] = "Sequential"
        },
        [2] = {
            [1] = "/cast [@player] Power Word: Shield",
            ["Type"] = "Action"
        }
    },
    ["InbuiltVariables"] = {
    }
}

commented

image
image