sacred-ritual-academy/Scripts/_.38.rb
2025-03-18 19:45:34 -05:00

25 lines
No EOL
1.1 KiB
Ruby
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#==============================================================================
# ■ RGSS3 画面外判定無視自律移動イベント Ver1.00 by 星潟
#------------------------------------------------------------------------------
# イベントの名前に特定キーワードを含める事で
# 画面外にいても自律移動を行うイベントを作成できるようになります。
# デフォルトでは、イベント名に<NTSE>を含める事で
# 画面外判定を無視するようになります。
#==============================================================================
module NTSE
WORD = "<NTSE>"
end
class Game_Event < Game_Character
alias near_the_screen_reigai? near_the_screen?
def near_the_screen?(dx = 12, dy = 8)
return true if near_the_screen_event
return near_the_screen_reigai?(dx, dy)
end
def near_the_screen_event
return @near_the_screen_event if @near_the_screen_event != nil
@near_the_screen_event = @event.name.include?(NTSE::WORD)
return @near_the_screen_event
end
end