Main Menu
  • Welcome to The RPG Maker Resource Kit.

Intro Script [Resolved]

Started by Spaz1991, April 09, 2007, 10:26:41 PM

0 Members and 1 Guest are viewing this topic.

Spaz1991

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]

:)

Watch out for: HaloOfTheSun

Spaz1991

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

:)

click the second link and download my game demo. if that's what you want then reply here.
Watch out for: HaloOfTheSun

Spaz1991

Hmm, i really only need the intro bit bofre the title, but that is sort of what i want

Kokowam

If you're showing images/pictures, make the screen black (using the white block tool everywhere) and use an event that uses "Show Picture"

Spaz1991

it needs to be before the title, it's easy else where

Kokowam

Use the thing from Scripts Database about cutscene before a title.

:)

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.
Watch out for: HaloOfTheSun

Spaz1991

Hmm that may work, unfortuantly one of the pictures are down but i'll give it a go, thankx

:)

No problem. Post here with results.
Watch out for: HaloOfTheSun

Spaz1991

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

:)

so is everything working alright?
Watch out for: HaloOfTheSun

Snailer

If solved? Add [RESOLVED] to topic title

I beat nouman :)

Kokowam

Lol. Look at his signature...

:)

=D

Blizzy added that. ANd it just made me win yaaa! lol
Watch out for: HaloOfTheSun

Kokowam

Lol. You win before the question's even solved.