25 lines
No EOL
1.1 KiB
Ruby
25 lines
No EOL
1.1 KiB
Ruby
#==============================================================================
|
||
# ■ 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 |