actionscript 3 - Multiple conditions for an if statement? (code doesn't work) -
this jigsaw-like puzzle game. want goes directly next scene after pieces in place. beside each "map piece" coordinate in proper place.
but //surprise surprise// doesn't work :c possible put many conditions in first place?
thank reading c: (justabeginner)
if (map1.x== 259.45 && map1.y== 77.05 && map2.x== 368.3 && map2.y== 69.45 && map3.x== 445.30 && map3.y== 90.4 && map4.x== 288.5 && map4.y== 207.15 && map5.x== 325.75 && map5.y== 164.65 && map6.x== 436.20 && map6.y== 187.65) { gotoandstop (1, "scene 3"); }
the code looks fine me. if condition doesn't evaluate true, might values different. how simple debugging step before if statement printf check if values same.
sometimes, precision play large role in such if statements.
happy coding :)
Comments
Post a Comment