Fixed Event Touch not working, fixed misnamed variables in module Effectiveness

This commit is contained in:
Maruno17
2021-05-08 16:31:33 +01:00
parent 43eddaa5da
commit 218225cc91
4 changed files with 29 additions and 22 deletions

View File

@@ -149,10 +149,20 @@ class Game_Event < Game_Character
end
end
def check_event_trigger_touch(check_x, check_y)
def check_event_trigger_touch(dir)
return if $game_system.map_interpreter.running?
return if @trigger != 2 # Event touch
return if !at_coordinate?(check_x, check_y)
case dir
when 2
return if $game_player.y != @y + 1
when 4
return if $game_player.x != @x - 1
when 6
return if $game_player.x != @x + @width
when 8
return if $game_player.y != @y - @height
end
return if !in_line_with_coordinate?($game_player.x, $game_player.y)
return if jumping? || over_trigger?
start
end