- 35
- Posts
- 8
- Years
- Seen Nov 1, 2018
This is one of my first code which is base on existing essentials code and might be easy for most of you but for some newbie like me I hope you guys find it useful. To copy, go to thread tools and select print to printable version. Goodluck and please give credit when use!
Please report any bugs or changes you made. Enjoy!
Code:
################################################################################################
#=================================Variable Game Speed==========================================#
# by jazerules #
# In order for it to work, create new script section above main but below PSystem_System. #
# To use as plug and play just press ALT and select your desired speed. #
# To use as event, in the event script call, put pbVariableSpeed . #
# It was tested with PE 16.2 without any problem and you can change speed even during battles!!#
# #
################################################################################################
module Input
unless defined?(update_KGC_ScreenCapture)
class << Input
alias update_KGC_ScreenCapture update
end
end
def self.update
update_KGC_ScreenCapture
if trigger?(Input::F8)
pbScreenCapture
end
if trigger?(Input::F7)
pbDebugF7
end
if trigger?(Input::ALT)
pbVariableSpeed
end
end
end
def pbVariableSpeed
return false if trigger?(Input::ALT) && @speed == true
@speed=true
command=[]
list=[
_INTL("SLOW"),
_INTL("NORMAL"),
_INTL("FAST"),
_INTL("TURBO"),
_INTL("CANCEL")
]
command=Kernel.pbMessage(_INTL("Please set your game speed."),list,0)
if command==0
Graphics.frame_rate=40
elsif command==1
Graphics.frame_rate=60
elsif command==2
Graphics.frame_rate=80
elsif command==3
Graphics.frame_rate=120
elsif command==4
@speed=false
return
break
end
@speed=false
end
def pbDebugF7
if $DEBUG
Console::setup_console
begin
debugBitmaps
rescue
end
pbSEPlay("expfull") if FileTest.audio_exist?("Audio/SE/expfull")
end
end
Please report any bugs or changes you made. Enjoy!
Last edited: