Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

MOG's Scene Story

I'm having problems with Moghunters Scene_Story script. I have the script being used as an intro for my game, called via an event, but once the scene ends, It just loops over and over in my event. After it's over, I want a transfer player action, but it never works...the screen just goes black.

Here's the script:
Code:
#_______________________________________________________________________________

# MOG Scene Story V1.0           

#_______________________________________________________________________________

# By Moghunter     

# [url=http://www.atelier-rgss.com]http://www.atelier-rgss.com[/url]

#_______________________________________________________________________________

# Tela de introdução, créditos, mudança de capítulos,etc...

# Para customizar basta trocar as pictures que estão na pasta

# Graphics/Title/

#

# CRD_PANO.png    ->  Imagem de fundo.

# CRD_OBJ.png    ->  Imagem Central.

# CRD_PART.png    ->  Imagem de partículas em movimento

# CRD_BORDER.png  ->  Imagem das bordas ou layout.

# CRD_BLANK      ->  Imagem usada para dar fade na tela.

# CRD_TEXT        ->  Imagem do texto(Créditos ou outros).

#

# Para definir o texto que será apresentado você deve

# coloca-lo na imagem CRD_TEXT.png com a largura máxima de 640.

# A altura pode ser qualquer tamanho, lembrando que os textos

# são pictures, portanto você pode mistura-los juntos com textos

# e imagens.

#

# Para chamar o script use este código no evento.

#

############################

# $scene = Scene_Story.new #

############################

#_______________________________________________________________________________

module MOG

#Definição da música de fundo. 

CREDITS_BGM = "013-Theme02"

#Tipo de transição.

CDT_TR_TYPE = "020-Flat01"

#Tempo para Transição.

CDT_TR_TIME = 100

#Velocidade da movimentação do texto.

TEXT_SPEED = 1

#Ativar as imagens.

OBJETO_VISIBLE = true

PARTI_VISIBLE = true

BORDER_VISIBLE = true

#Tipo de Sinteticidade (Bleding).

# 0 - Normal

# 1 - Inverter

# 2 - Multiplicar

OBJETO_BLEND = 0

PARTI_BLEND = 1

BORDER_BLEND = 1

#Definição da movimentação da partícula 1.

PARTI_01_OX = 1    #(horizontal)

PARTI_01_OY = 2    #(vertical)

#Definição da movimentação da partícula 2.

PARTI_02_OX = -1  #(horizontal)

PARTI_02_OY = 2    #(vertical)

#Tipo de Background

# true = Panorama

# false = Mapa

PANORAMA_MODE = true

end

#-------------------------------------------------------------------------------   

class Scene_Story

include MOG 

def main

Audio.bgm_fade(7000)

if PANORAMA_MODE == false

@spriteset = Spriteset_Map.new

else

@pano = Plane.new

@pano.bitmap = RPG::Cache.title("CRD_PANO")   

@pano.z = 1

end

@objeto = Sprite.new

@objeto.bitmap = RPG::Cache.title("CRD_OBJ")   

@objeto.z = 10

@objeto.x = 230

@objeto.y = 170

@objeto.visible = OBJETO_VISIBLE

@objeto.blend_type = OBJETO_BLEND

@objeto.opacity = 0

@particula_01 = Plane.new

@particula_01.bitmap = RPG::Cache.title("CRD_PARTI")   

@particula_01.z = 20

@particula_01.blend_type = PARTI_BLEND 

@particula_01.opacity = 0 

@particula_01.visible = PARTI_VISIBLE   

@particula_02 = Plane.new

@particula_02.bitmap = RPG::Cache.title("CRD_PARTI")   

@particula_02.z = 250

@particula_02.ox = 320

@particula_02.oy = 240

@particula_02.blend_type = PARTI_BLEND

@particula_02.opacity = 0

@particula_02.visible = PARTI_VISIBLE

@border = Sprite.new

@border.bitmap = RPG::Cache.title("CRD_BORDER")   

@border.z = 30

@border.blend_type = BORDER_BLEND

@border.visible = BORDER_VISIBLE

@texto = Sprite.new

@texto.bitmap = RPG::Cache.title("CRD_TEXT")

@texto.y = 480

@texto.z = 25

@texto.opacity = 0

@blank = Plane.new

@blank.bitmap = RPG::Cache.title("CRD_BLANK")   

@blank.z = 40

@blank.opacity = 253

@time = 0

@time_fv = 0

@texto_Time = 0

@time_move = 0

@time_fade = 480 + @texto.bitmap.height

Graphics.transition(CDT_TR_TIME, "Graphics/Transitions/" + CDT_TR_TYPE)

Audio.bgm_play("Audio/Bgm/" + CREDITS_BGM)

loop do

Graphics.update

Input.update

update

if $scene != self

break

end

end

Graphics.freeze

if PANORAMA_MODE == false

@spriteset.dispose

else

@pano.dispose   

end

@objeto.dispose

@particula_01.dispose

@particula_02.dispose

@border.dispose

@texto.dispose

@blank.dispose

$game_map.autoplay

end

def update

@time_fv += 1

@time += 1

@time_move += 1   

@objeto.opacity += 1

if PANORAMA_MODE == true

@pano.ox += 1

end

@particula_01.opacity += 15

@particula_02.opacity += 15   

@particula_01.ox += PARTI_01_OX

@particula_01.oy += PARTI_01_OY

@particula_02.ox += PARTI_02_OX

@particula_02.oy += PARTI_02_OY     

@texto.opacity += 1

if @time_fade  <= 0

@blank.opacity += 1

Audio.bgm_fade(10000)

end

if @time_fade  > 0 and @blank.opacity > 0

@blank.opacity -= 1

end

if @blank.opacity >= 254 and @time_fade  <= 0

$scene = Scene_Map.new     

end       

if @time_move > 1 and @blank.opacity <= 0

@time_move = 0

@texto.oy += TEXT_SPEED

@time_fade -= TEXT_SPEED

end       

if @time > 12

@time = 0

end

if @time_fv > 100

@time_fv = 0

end 

if @time_fv > 50

if @time >= 12

@objeto.y -= 1

end

else

if @time >= 12

@objeto.y += 1   

end

end

if @objeto.y < 160

@objeto.y = 160

elsif @objeto.y > 180

@objeto.y = 180

end

end

end

Here's a link to a demo:
http://www.mediafire.com/?ognvzitniqz

Please Help!!
 
Well this is a bit weird, helping the same person with a different request using the same bit of code. Heh. Alright, if you remember rightly I showed you a little something I had to use as a quick teleport (Your other support thread, this same code can be applied here).

Code:
class Scene_QuickMapTeleport

 

def main

    # Play decision SE

    $game_system.se_play($data_system.decision_se)

    # Set transferring player flag

    $game_temp.player_transferring = true

    # Set the play destination

    Audio.bgm_fade(800)

    Audio.bgs_fade(800)

    Audio.me_fade(800)

    $game_temp.player_new_map_id = 1

    $game_temp.player_new_x = 5

    $game_temp.player_new_y = 5

    $game_temp.player_new_direction = 2

    $game_map.autoplay

    # Prepare for transition

    Graphics.freeze

    # Set transition processing flag

    $game_temp.transition_processing = true

    $game_temp.transition_name = "001-Blind01"

    $scene = Scene_Map.new

    

    def update

    end

  end

  

 end

 

And to make it work in the Mog_Hunter script just change line 161 to this code
Code:
$scene = Scene_QuickMapTeleport.new  

Hope this helps.
 
Haha. And you come through for me again. Your like an angel sent down as my little helper. :biggrin:
Thanx yet again :wink:

EDIT: Actually, it works, but as soon as I'm teleported to the next map where the options are, it just loops and plays it again. Why is this?




EDIT: Nevermind...lol. After 20 minutes of hassle, i just gave my intro event a self switch, and then it stopped :biggrin:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top