The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: Spaz1991 on April 09, 2007, 10:26:41 PM

Title: Intro Script [Resolved]
Post by: Spaz1991 on April 09, 2007, 10:26:41 PM
Hello, I have been trying to implement an introduction script into my game that shows pictures before the title screen, I am using a basic script i found but i cannot get it working properly, i do not get any errors, it just goes straight to the title screen. Please would someone help me with this script as i cannot see why it isn't working.

All my pictures are correctly named and placed in the right folders as well. If someone can solve this for my i would appreciate it ^_^

Script ?
[spoiler]#----------------------
#Scene Introduction
#written by rpgmaker
#-----------------------

class Scene_Introduction 
 
def main
   $data_system = load_data("Data/System.rxdata")
   $game_system = Game_System.new
   $game_system.bgm_play($data_system.title_bgm)
   
#slides for introduction
@wait = 0
   @sprite = Sprite.new
   @sprite.bitmap = RPG::Cache.picture("splash1.bmp")
   Graphics.transition(200)
   Graphics.freeze
   @sprite.dispose
   @sprite = Sprite.new
   @sprite.bitmap = RPG::Cache.picture("splash2.bmp")
   Graphics.transition(200)
    Graphics.freeze
         Audio.bgm_play("Audio/BGM/" + "015-Theme04.mid", 100, 100)
   @sprite.dispose
   @sprite = Sprite.new
   @sprite.bitmap = RPG::Cache.picture("splash3.bmp")
   Graphics.transition(200)
    Graphics.freeze
   @sprite.dispose
           @sprite = Sprite.new
   @intro = Sprite.new
   @intro.bitmap = RPG::Cache.picture("Title.png")
   @intro.x = 0
   @intro.y = 0
   @intro.z = 0
   @intro.opacity = 10
#slides for introduction   
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if @sprite.bitmap == RPG::Cache.picture("main")
     @wait += 1.5
     end
     if @wait >= 1000
       @intro.dispose
       $scene = Scene_Introduction.new
      return @wait = 0
    end
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @sprite.dispose
   @intro.dispose
end
 
def update
   @sprite.update
   @intro.update
   if @intro.opacity < 250
     @intro.opacity += 2
     return
   end
   if @intro.opacity == 250
     loop do
       Graphics.update
       Input.update
       @intro.update
       @intro.opacity -= 2
       break if @intro.opacity == 10
       next
     end
   end
   if @intro.visible == true
        break if Input.trigger?(Input::C) or Input.trigger?(Input::B)
        $scene = Scene_Title.new
      end
end
 
end
[/spoiler]
Title: Re: Intro Script
Post by: :) on April 09, 2007, 10:29:07 PM
go here and use this way:

http://rmrk.net/index.php/topic,8605.0.html

Example can be found in my game demo:

http://rmrk.net/index.php/topic,13136.0.html
Title: Re: Intro Script
Post by: Spaz1991 on April 09, 2007, 10:41:03 PM
It's not a cut-scene, I'm trying to show four different images before the title screen.

Also i'm not exactly amazing at scripting
Title: Re: Intro Script
Post by: :) on April 09, 2007, 10:41:34 PM
click the second link and download my game demo. if that's what you want then reply here.
Title: Re: Intro Script
Post by: Spaz1991 on April 09, 2007, 10:48:54 PM
Hmm, i really only need the intro bit bofre the title, but that is sort of what i want
Title: Re: Intro Script
Post by: Kokowam on April 09, 2007, 10:50:01 PM
If you're showing images/pictures, make the screen black (using the white block tool everywhere) and use an event that uses "Show Picture"
Title: Re: Intro Script
Post by: Spaz1991 on April 09, 2007, 10:53:19 PM
it needs to be before the title, it's easy else where
Title: Re: Intro Script
Post by: Kokowam on April 09, 2007, 10:57:15 PM
Use the thing from Scripts Database about cutscene before a title.
Title: Re: Intro Script
Post by: :) on April 09, 2007, 11:00:43 PM
yea, don't worry about the after part thats the start of my game.

well...the link I gave you is the exact way to do it. It shows how to make a cutscene correct? well what about a cutscene of pictures? use the picture command.
Title: Re: Intro Script
Post by: Spaz1991 on April 09, 2007, 11:02:22 PM
Hmm that may work, unfortuantly one of the pictures are down but i'll give it a go, thankx
Title: Re: Intro Script
Post by: :) on April 09, 2007, 11:03:35 PM
No problem. Post here with results.
Title: Re: Intro Script
Post by: Spaz1991 on April 09, 2007, 11:36:17 PM
I did try it but it take ages, i worked out the problem too, i had forgotton to edit the main script telling it to start on the intro reather than title
Title: Re: Intro Script
Post by: :) on April 09, 2007, 11:48:51 PM
so is everything working alright?
Title: Re: Intro Script
Post by: Snailer on April 09, 2007, 11:57:34 PM
If solved? Add [RESOLVED] to topic title

I beat nouman :)
Title: Re: Intro Script
Post by: Kokowam on April 10, 2007, 12:26:21 AM
Lol. Look at his signature...
Title: Re: Intro Script
Post by: :) on April 10, 2007, 12:28:15 AM
=D

Blizzy added that. ANd it just made me win yaaa! lol
Title: Re: Intro Script
Post by: Kokowam on April 10, 2007, 12:30:46 AM
Lol. You win before the question's even solved.