Double condition (if x=1 and y=1 then z=1)

Discuss problems and solutions.
Post Reply
thopa
Newbie
Posts:17
Joined:12 Dec 2011 09:55
Double condition (if x=1 and y=1 then z=1)

Post by thopa » 15 Oct 2017 22:19

Hi!

I think the tittle says it all.

I had solved this problem before but cannot find the template i was using it on.

So basically i want a script or action to get executed only when two other conditions or rules are true.

Help!

Westbam
Newbie
Posts:5
Joined:13 Nov 2016 21:10

Re: Double condition (if x=1 and y=1 then z=1)

Post by Westbam » 03 Nov 2017 16:55

I know it is late, but for the others (and this is in the manual!)

Code: Select all

if (x==1 && y==1){
 z = 1;
}
You need to declare X, Y and Z somewhere.

Note the == for comparing. && means and, || means or.

thopa
Newbie
Posts:17
Joined:12 Dec 2011 09:55

Re: Double condition (if x=1 and y=1 then z=1)

Post by thopa » 05 Nov 2017 21:35

Hi! Thanks a lot!
This is in the manual? I get confused with what manual to use!
Anyway this is great info, i can go back to implementing double button presses and combos, had to do it with sone old bomes template!
Much apreciated!

Post Reply