06-04-2015, 06:55 AM
So, while i get why I am getting the error I have no idea how to fix it. I create the following method to make the player move slow in snow, shallow water, etc. However, after about 10-20 seconds of walking I get a script hanging error telling me there is either a loop issue (maybe) or something causing graphics not to update. Disregard the x,y that was for when i was using $game_map's terrain tag. Then I say the player has a dedicate terrain tag and just never removed the x,y.
I have a similar method that speeds the player up and i have no issue. Any ideas for a solution?
Code:
def move_shallowly?
# Save Player Position
x, y = self.x, self.y
# Check for Terrain Trigger
tile_effect = self.terrain_tag
autotile_names = $game_map.autotile_names
if tile_effect == 1 # Deep snow, High Grass, bushes - Slow Down
@move_speed = 2
@move_frequency = 3
end
end
I have a similar method that speeds the player up and i have no issue. Any ideas for a solution?
Code:
def move_normally?
# Save Player Position
x, y = self.x, self.y
# Check for Terrain Trigger
tile_effect = self.terrain_tag
autotile_names = $game_map.autotile_names
if tile_effect == 0 # Reset Non Status Effects
if not running?
@move_speed = 4
@move_frequency = 5
end
end
end