if $game_switches[10] == true
a = $game_map.events[1].screen_x
b = $game_player.screen_x
c = $game_map.events[1].screen_y
d = $game_player.screen_y
if $game_map.events[1].direction == 4
......
end
for j in 11..14
a = $game_map.events[2].screen_x
b = $game_map.events[j].screen_x
c = $game_map.events[2].screen_y
d = $game_map.events[j].screen_y
if $game_map.events[2].direction == 4
......
end
end
end