Hi all,
in an adventure game I’m coding during these days, I have a movieclip containing 4 rotating handles. When the four handles linked with a variable returns a certain value, a door opens.
I’ve tried to use && operator, in this way:
this.onEnterFrame = function() {
if ((_root.gira1 == 1) && (_root.gira2>0) && (_root.gira3>0) && (_root.gira4>0)) {
gotoAndPlay(“action”);
delete this[“onEnterFrame”];
}
}
this doesn’t function because && operator just compare two expressions, and no more than two (that is the function will function if I limit it to control just (_root.gira1>0) && (_root.gira2>0))
How can I replace this simple code with a 4-variables controlling one? A for cycle will be the solution?
thanking you in advance