|
fisban_Regner Beginner
Joined: 05 Nov 2020 Posts: 14
|
Posted: Fri Nov 13, 2020 5:44 pm
alise that waits |
I'm sure this has been asked before but i cant seem to find it.
i want to create an alias that waits for a variable input before it continues to the next step.
i have a trigger that sets balance to 1
alias fly
command 1
#var balance 0
wait for balance to = 1
command 2
#var balance 0
wait for balance = 1
command 3
#var balance 0 |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Fri Nov 13, 2020 8:49 pm |
An alias is fine to start this, but you want an expression trigger to finish it.
commandList=command 1|command 2|command 3
#TR {@balance=1} {#EXEC %pop(commandList);balance=0}
Make sure you change the type of the trigger to expression in the GUI or it won't work. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
fisban_Regner Beginner
Joined: 05 Nov 2020 Posts: 14
|
Posted: Fri Nov 13, 2020 10:42 pm |
ok i think i understand this please correct me if I'm wrong. sorry i don't have syntax memorized i still use the gui to create triggers.
so i make an alias
fly
command 1
balance = 0
commandlist = command2|command3|command4
i make a trigger
you recover balance
balance = 1
#exec %pop(commandlist)
balance = 0
so the %pop removes the first item in the list while it being executed
causing the trigger to step through the list
now i could even go further and use other aliases to add items to this list using %push(@commandlist,"stand") ? //edited
if that is written correctly then %additem(@commandlist,"stand") would add it to the end? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Fri Nov 13, 2020 10:58 pm |
Yes, that is correct.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|