| 1 | var rail_switch = false; |
| 2 | with (obj_mc_button) |
| 3 | { |
| 4 | if (track_number == other.track_number && swit == true) |
| 5 | rail_switch = true; |
| 6 | } |
| 7 | if (rail_switch == true) |
| 8 | { |
| 9 | if (rotation == "horizontal") |
| 10 | { |
| 11 | sprite_index = spr_mc_rail_vertical; |
| 12 | rotation = "vertical"; |
| 13 | } |
| 14 | else if (rotation == "vertical") |
| 15 | { |
| 16 | sprite_index = spr_mc_rail_horizontal; |
| 17 | rotation = "horizontal"; |
| 18 | } |
| 19 | } |