じ☆ve冰风 发表于 2026-8-1 19:58:03

Disable Encounter

Disable Encounter 1.0.0
Feelzor​

Introduction
This script simply disables the encounter temporarily everywhere in just one call; same to enable it again.

Features
- Disables the encounter

How to Use
Just copy-paste the code in the script editor and then call it from wherever you want using the following instructions:
To disable the encounter temporarily, just open a script and put in it $game_player.disable_encounter.
To enable it again, just open a script and put in it $game_player.enable_encounter.
The script won't re-enable it automatically.

Script
                Code:       
#################################################################################
#                               DISABLE ENCOUNTER                               #
#                                  By: FEELZOR                                  #
#################################################################################
#                                                                               #
# Free to use for any commercial or non-commercial project.                     #
# Credits not required but really appreciated.                                  #
#                                                                               #
# To disable encounter, make a script call with $game_player.disable_encounter#
# in it. To enable it again, make a script call with                            #
# $game_player.enable_encounter.                                                #
#################################################################################
if true #set to false to disable
class Game_Player < Game_Character
alias enc_initialize initialize
def initialize
    enc_initialize
    @encounter_disabled = false
end

alias enc_encounter encounter
def encounter
    return false if @encounter_disabled
    enc_encounter
end

def enable_encounter
    $game_player.make_encounter_count
    @encounter_disabled = false
end

def disable_encounter
    @encounter_disabled = true
end
end
end #endif


Credit and Thanks
- Feelzor
- IXFURU who inspired me with their DISABLE DASH script.

Author's Notes
As it is my first script, it may have problems or be written in a wrong way.
I tried to do my best making it as I found no script like that while searching on Google (maybe that's because I'm not level 1 yet..
data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7), but do not hesitate to give me any tip to improve the code!


本贴来自国际rpgmaker官方论坛作者:Feelzor处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/disable-encounter.85943/
页: [1]
查看完整版本: Disable Encounter