Code: Select all
on Switch#Switch=1 do
// body of rule
EndOn
I mean about something like this:
Code: Select all
on Switch#Switch=1 or another_event do
// body of rule
EndOn
Code: Select all
event,another_event
Moderators: grovkillen, Stuntteam, TD-er
Code: Select all
on Switch#Switch=1 do
// body of rule
EndOn
Code: Select all
on Switch#Switch=1 or another_event do
// body of rule
EndOn
Code: Select all
event,another_event
The situation is more complicated. Its because as a "switch" I use 3D gesture sensor. To be more precise - I'm trying to use that one:You can also change the switch mode from "normal" to "toggle".
Finally I got it working. But i think that there is limitation of maximum amount of called events from event to two. My rule code has a structure:grovkillen wrote: ↑18 Oct 2019, 19:03 You should call an event from the switch#switch event. That way you can easily call that event using any way you want.
Code: Select all
on Switch#Switch=1 do
if somethink_1
event,event_1
// rest body of rule
endif
if somethink_2
event,event_1
// rest body of rule
endif
.........
if somethink_8
event,event_1
// rest body of rule
endif
EndOn
Code: Select all
on Switch#Switch=1 do
event,action
endon
On action do
if somethink_1
event,event_1
// rest body of rule
endif
if somethink_2
event,event_1
// rest body of rule
endif
.........
if somethink_8
event,event_1
// rest body of rule
endif
EndOn
Code: Select all
on Switch#Switch=1 do
event,action
endon
On action do
if somethink_1
event,event_1
// rest body of rule
endif
if somethink_2
event,event_1
// rest body of rule
endif
.........
if somethink_8
event,event_1
// rest body of rule
endif
EndOn
On event_1 do
event,event_2
// rest body of rule
EndOn
On event_2 do
event,event_3
// rest body of rule
EndOn
On event_3 do
// body of rule
EndOn
Code: Select all
On event_1 do
// rest body of rule
event,event_2
event,event_3
EndOn
Code: Select all
On System#Boot Do
Let,1,0
EndOn
On LoopDeLoop Do
Let,1,[INT#1]+1
Event,event_[INT#1]
EndOn
On event_1 Do
//body of rule
Event,LoopDeLoop
EndOn
On event_2 Do
//body of rule
Event,LoopDeLoop
EndOn
On event_3 Do
//body of rule
Event,LoopDeLoop
EndOn
On event_4 Do
Let,1,0
//body of rule
EndOn
Users browsing this forum: Google [Bot] and 126 guests