Open TheStraying11 opened 7 months ago
This can already be done with one trigger and three tasks. Unless I'm misunderstanding.
Ohh I see what you're saying. Instead, you'd just do three triggers of every X minutes. Each with one of the messages. I think that's what you're wanting.
let me add some "pseudocode" (python xD)
import time
i = 0
taskList = [
lambda: print("MessageOne"),
lambda: print("MessageTwo"),
lambda: print("MessageThree")
# you have the ability to easily add as many of these as you like
]
while True:
taskList[i]()
i += 1
i %= len(taskList)
time.sleep(10*60) # 10 minute sleep
the current way, as far as i can see, say you want this to trigger at 5pm every day, you'd have to manually work out the timings, so that it plays the next message at the correct time, and then cycles back
i suppose, rather than that while loop if you put the taskList[i]()
, and the i+=1
and i%=len(taskList)
parts in a def trigger():
, that's more like what would happen in AMP, like, whatever you set the trigger to, those three lines get called every single time it triggers
Perhaps the Wait Task would be what you want then?
https://paste.gg/p/TheStraying11/83783d3e762844e1bb9d051d9af219bf
here is a more robust example that shows its usefulness over the "Wait" task, while the first two are just harder to do with just "Wait", specifically the last trigger I define, cannot be done with a wait, this would not only be a convenience tool, but a much more powerful one aswell
you could have for example, a trigger where, if a player performs a certain action, a certain number of times, they get banned, but before that they are given warnings, or a warning if a backup fails once, then another if it fails twice, and finally if it fails three times, the server gets shut down
Feature Request
Feature Information:
What should it do? a task "cycle", which can have additional tasks added inside of it, and each time that parent task is run, it executes the next task in it's list
For example:
would send "MessageOne", then "MessageTwo", then "MessageThree", one after the other, with one message every 10 minutes, repeating after "MessageThree"
I confirm: