Seite 1 von 1

#1 Alter der Variablen als Event ?

Verfasst: Mo 3. Nov 2014, 14:07
von koboldo
Moin,
kann ich das alter einer Variablen auch als Event benutzen ?
Abfragen kann man das alter ja im Logic Tab mit age('VAR.blabla')
Ich möchte jetzt aber, das ein Event ausgelöst wird, wenn die Variable VAR.blabla ein bestimmtes alter erreicht hat.
Jemand eine Idee ?
Gruß
Jörg

#2 RE: Alter der Variablen als Event ?

Verfasst: Mo 3. Nov 2014, 15:06
von DOMIQ-Support
I think this should solve your problem:

Code: Alles auswählen

test = use 'VAR.tester'

function test:ontick()
   if age('VAR.tester') > 100 then
      --do anything you want:)
   end
end

#3 RE: Alter der Variablen als Event ?

Verfasst: Mo 3. Nov 2014, 16:45
von koboldo
It works :thumbup: