Persistents in condition statements are accessed in the same way as in the prelude.
The following action will fire when the persistent variable ent:archive_pages
is greater than 3:
if ent:archive_pages > 3 then
notify(...)
Persistent flags and counters can also be tested with an associated timeframe. For example, the following action will fire when persistent variable ent:archive_pages is greater than 3 and the last time it as set was within the last two hours:
if
Code Block | ||||
---|---|---|---|---|
| ||||
if ent:archive_pages > 3 |
...
then
event:send(...) |