oldsnake90
Creator Pokemon Glacial Freeze
- 61
- Posts
- 15
- Years
- Wisconsin USA
- Seen Feb 5, 2023
how can i make it so i can have a .AVI video intro? before the title screen
#===============================================================================
# ** Scene_Movie class, created by SoundSpawn, fixed by Popper and edited a
# little by xAlien95.
#-------------------------------------------------------------------------------
# Instruction
# 1) Movies must in in a new folder called Movies in your directory
# 2) If you call this script from and event, e.g.
# Call Script: $scene = Scene_Movie.new("INTRO")
# 3) Have fun playin movies with this script!!!
#===============================================================================
class Scene_Movie
def initialize(movie)
@movie_name = RTP.getPath("Movies\\"+movie+".avi").gsub(/\//,"\\")
end
def main
@temp = Win32API.pbFindRgssWindow.to_s
movie = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','V')
x=movie.call("open \""+@movie_name+
"\" alias FILE style 1073741824 parent " + @temp.to_s,0,0,0)
@message = Win32API.new('user32','SendMessage','%w(l,l,l,l)','V')
@detector = Win32API.new('user32','GetSystemMetrics','%w(l)','L')
@width = @detector.call(0)
if @width == 640
#fullscreen
Graphics.update
sleep(0.1)
Graphics.update
sleep(0.1)
Graphics.update
sleep(0.1)
#fullscreen
end
status = " " * 255
x=movie.call("play FILE",0,0,0)
loop do
sleep(0.1)
@message.call(@temp.to_i,11,0,0)
Graphics.update
@message.call(@temp.to_i,11,1,0)
Input.update
movie.call("status FILE mode",status,255,0)
true_status = status.unpack("aaaa")
if true_status.to_s != "play"
break
end
if Input.trigger?(Input::B)
movie.call("close FILE",0,0,0)
$scene = Scene_Intro.new(['intro1'], 'splash') # Changed Scene
break
end
end
$scene = Scene_Intro.new(['intro1'], 'splash') # Changed Scene
end
end
def pbCallTitle #:nodoc:
if $DEBUG
return Scene_DebugIntro.new
else
# Edited by xAlien95
# First parameter: name of the AVI collocated in "/Movies/[here].avi"
# To change the splash pics, edit the script "Scene_Movie"
return Scene_Movie.new("INTRO") # Changed Scene
end
end
def mainFunction #:nodoc:
if $DEBUG
pbCriticalCode { mainFunctionDebug }
else
mainFunctionDebug
end
return 1
end
def mainFunctionDebug #:nodoc:
begin
getCurrentProcess=Win32API.new("kernel32.dll","GetCurrentProcess","","l")
setPriorityClass=Win32API.new("kernel32.dll","SetPriorityClass",%w(l i),"")
setPriorityClass.call(getCurrentProcess.call(),32768) # "Above normal" priority class
$data_animations = pbLoadRxData("Data/Animations")
$data_tilesets = pbLoadRxData("Data/Tilesets")
$data_common_events = pbLoadRxData("Data/CommonEvents")
$data_system = pbLoadRxData("Data/System")
$game_system = Game_System.new
setScreenBorderName("border") # Sets image file for the border
Graphics.update
Graphics.freeze
$scene = pbCallTitle
while $scene != nil
$scene.main
end
Graphics.transition(20)
rescue Hangup
pbEmergencySave
raise
end
end
loop do
retval=mainFunction
if retval==0 # failed
loop do
Graphics.update
end
elsif retval==1 # ended successfully
break
end
end
http : // www . mediafire . com / ?nqpm9nxm8bse991