You can actually write scripts directly inside of the editor actions too with the "execute a script" action part.
I use it quite often for writing short bits of Lua script instead of creating functions & scripts inside of the script section - saves time is all, unless you are writing a function that will be used multiple times or is global & can be used for different things.
@NoCom: You don't have to set all 3 values for the
for loop. By default it will automatically start from 1 & finish on the final (second value) you set. The third value sets the value to increase by...
for example...
for i = 1, 10, 0.25 do
print(i)
end
result would be:
1
1.25
1.5
1.75
2
2.25
...
10
Also... if the condition names are unique & other conditions do not contain the same name then you can use the global conditions table instead of linking directly to them
getObject("Conditions[condition_name]")
having said this... it is better to directly link to them, when possible, because it is the safer method.
Finally for the example above, you could have also added the names of the conditions into a table like so...
local t = {"condition_name_1", "condition_name_2", "condition_name_3", ...}
for i = 1, #(t) do -- for i is 1 to total of entries in table "t"
getObject("Conditions[" .. t[i] .. "]"):setValue(VConditionValue, true)
end
Anyway, nice one on providing help for a lua related question!