This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

event start part of the script
#1
I try to find out how i can trigger a part of a script.

i think i need to use event.dst.

I add tags on the groupsobject who trigger the script.

The script have multiple part what to do.

If the script is trigger by 1/1/1 i will just run the first part of a script.
if it is trigger by 1/1/2 i just run the second part of the script.

i think i need to use event.dst and elseif, but don't know how to use it.

Somebody who can help me with this?
Reply
#2
if event.dst == '1/1/1' then
-- do something
elseif event.dst == '1/1/2' then
-- do something
elseif event.dst == '1/1/3' then
-- do something
else
-- do something when nothing matches event.dst
end
Reply
#3
Thank you Erwin,

is it also posible to use this if '1/1/1' = false?
and when 1/1/1 is between 0 and 50

Or can we only use it when it is true?
Reply
#4
Replace — do something with:

if event.getvalue() == false then
— do something 
end

or

value = event.getvalue()
if value >= 0 and value <= 50 then
— do something 
end
Reply
#5
Thank you Erwin, i will try this.
Reply


Forum Jump: