Conditional trigger possible?

Discuss RoboTask here
Post Reply
SplinterCell
Posts: 1
Joined: Tue Nov 05, 2013 7:18 am

Conditional trigger possible?

Post by SplinterCell »

There is a system with a single button.

The logic:
[0] Standby
[1] User presses a button for the first time
[2] An audio file is played
[3a] User presses the button while audio is playing -> [4]
[3b] User does NOT press the button while audio is playing -> [1]
[4] More actions are performed -> [1]

The part I am currently struggling to figure out is logic behind the 3a and 3b triggers (e.g. how to make one button perform different actions, based on a situation when it is pressed)

I would deeply appreciate your help and input.

Thank you,
Alexander K
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Conditional trigger possible?

Post by Oleg »

You can not make conditional trigger. The trigger only waits the event and starts the task.
BUT you can make conditional execution. See algorithm below:

Code: Select all

if condition1 then
   ....
   do something
   ....
elseif condition2 then
   ....
   do something else
   ....
else
   ...
   do another steps
   ...
end if
Oleg Yershov
Post Reply