I cant Get a Gameover text script working

Joined
Mar 23, 2016
Messages
12
Reaction score
0
First Language
English
Primarily Uses
I need some assistance from good scripter(s) im trying to script a game over screen with text, i did find a script but i dont know where to put it, i tried putting it in the gameover script its self nothing, i tried putting it in the materials script list, and it works, but i want to make it so the text box is invisible and it appears at the bottom middle of the screen and make it transition to another text box, this is what the script is that i found:


class Scene_Gameover < Scene_Base
  alias galv_chigoo_gotext_start start
  def start
    galv_chigoo_gotext_start
    create_txt_window
  end
  
  def create_txt_window
    @txt_window = GoText_Window.new
  end
end
class GoText_Window < Window_Base
  def initialize
    super(0, 0, Graphics.width, fitting_height(1))
    draw_message
  end
  def draw_message
    txt = "Your score is " + $game_variables[1].to_s
    draw_text(0,0, Graphics.width, line_height, txt,1)
  end
end


Gameover 1.png


I Just tried this:


class Scene_Gameover < Scene_Base
  alias galv_chigoo_gotext_start start
  def start
    galv_chigoo_gotext_start
    create_txt_window
  end
  
  def create_txt_window
    @txt_window = GoText_Window.new
  end
end
class GoText_Window < Window_Base
  def initialize
    super(0, 0, Graphics.width, fitting_height(1))
    draw_message
  end
  def draw_message
    txt = "Dont Give Up Just Yet" + "Michael Stay Determined"   draw_text(0,0, Graphics.width, line_height, txt,1)
  end
end




But its in one text box still on the top of the screen:


Gameover 2.png:


Please Send a Script to fix this, i cant find anywhere on the internet of how to fix this


P.S (Also Help Make The Menu's and The Battle Buttons look like they do in UNDERTALE, and possibly a bullet hell battle syst. Thanks :D )
 
Last edited by a moderator:

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
.........please put that in code tag...this almost unreadable.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
super(0, 0, Graphics.width, fitting_height(1))

super(x,y,width,height)


this should explain why the stuff is on the top.
 
Joined
Mar 23, 2016
Messages
12
Reaction score
0
First Language
English
Primarily Uses
super(0, 0, Graphics.width, fitting_height(1))

super(x,y,width,height)


this should explain why the stuff is on the top.
I will mess with the X and Y but the Rest, idk about, im kinda young so its hard to script
 
Last edited by a moderator:
Joined
Mar 23, 2016
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Gameover 3.png


I got it in the spot i want it (Still debaiting on 250 or 300 y) how do i change the font, font size, and make the textbox invisible, and make changing text
 
Last edited by a moderator:

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
Code:
class GoText_Window < Window_Base
  def initialize
    super(0, 0, Graphics.width, fitting_height(1))
    draw_message
    set_opacity
  end
  
  def draw_message
    txt = "Dont Give Up Just Yet" + "Michael Stay Determined"   
    draw_text(0,0, Graphics.width, line_height, txt,1)
  end
  
  def set_opacity
  self.opacity = 0
  end
  
end
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
def initialize
super(0, 0, Graphics.width, fitting_height(1))
if(Font.exist?("Font name")
contents.font = Font.new("Font name", size)
end
back_opacity = 0
opacity = 0
draw_message
end




That should fix your issues, but I recommend if you want to continue working with scripting, you also check out the manual for a little explanation on how the internals of RM work. Getting good at scripting is going to take time, for sure, but if you're serious about it just keep trying and you'll learn with time. Learning to program is no easy job, and it will take you a long time to do, but it can really pay off in the long-run.


Also, more of a personal thing, don't capitalize every word in your sentence. It looks really stupid. You don't do it in any of your posts, so don't do it in you window.


And finally grammar critique: Try, "Don't give up just yet, Michael, stay determined!" Having it as two separate sentences like that is odd and most likely not grammatically correct.
 
Joined
Mar 23, 2016
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Code:
class GoText_Window < Window_Base
  def initialize
    super(0, 0, Graphics.width, fitting_height(1))
    draw_message
    set_opacity
  end
  
  def draw_message
    txt = "Dont Give Up Just Yet" + "Michael Stay Determined"   
    draw_text(0,0, Graphics.width, line_height, txt,1)
  end
  
  def set_opacity
  self.opacity = 0
  end
  
end
Gameover 4.png


Its getting there :p  btw thanks for helping me out
 
Joined
Mar 23, 2016
Messages
12
Reaction score
0
First Language
English
Primarily Uses
def initialize
super(0, 0, Graphics.width, fitting_height(1))
if(Font.exist?("Font name")
contents.font = Font.new("Font name", size)
end
back_opacity = 0
opacity = 0
draw_message
end




That should fix your issues, but I recommend if you want to continue working with scripting, you also check out the manual for a little explanation on how the internals of RM work. Getting good at scripting is going to take time, for sure, but if you're serious about it just keep trying and you'll learn with time. Learning to program is no easy job, and it will take you a long time to do, but it can really pay off in the long-run.


Also, more of a personal thing, don't capitalize every word in your sentence. It looks really stupid. You don't do it in any of your posts, so don't do it in you window.


And finally grammar critique: Try, "Don't give up just yet, Michael, stay determined!" Having it as two separate sentences like that is odd and most likely not grammatically correct.


Error.png


Now im getting an error msg


what did i do wrong

Code:
class Scene_Gameover < Scene_Base
  alias galv_chigoo_gotext_start start
  def start
    galv_chigoo_gotext_start
    create_txt_window
  end
  
  def create_txt_window
    @txt_window = GoText_Window.new
  end
end
class GoText_Window < Window_Base
 def initialize
    super(0, 0, Graphics.width, fitting_height(1))
    if(Font.exist?("8bitoperator JVE")
        contents.font = Font.new("8bitoperator JVE", size)
    end
  end
    back_opacity = 0
    opacity = 0
    draw_message
  end
  
  def draw_message
    txt = "You cannot give up just yet..." + "Michael Stay determined..."   
    draw_text(0,0, Graphics.width, line_height, txt,1)
  end
  
  def set_opacity
  self.opacity = 0
 end
end
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
I forgot a close parenthesis on the end of the Font.exist? if statement. Just add one on the end of the line, it was my mistake.
 
Joined
Mar 23, 2016
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Ok now im confused??


Error.png


Please see if you can fix this, idk what that even means

Code:
class Scene_Gameover < Scene_Base
  alias galv_chigoo_gotext_start start
  def start
    galv_chigoo_gotext_start
    create_txt_window
  end
  
  def create_txt_window
    @txt_window = GoText_Window.new
  end
end

class GoText_Window < Window_Base
 def initialize
    super(0, 0, Graphics.width, fitting_height(1))
    if(Font.exist?("8-bit Operator+"))
        contents.font = Font.new("8-bit Operator+", size)
    end
  end
    back_opacity = 0
    opacity = 0
    draw_message
  end
  
  def draw_message
    txt = "You cannot give up just yet..." + "Michael Stay determined..."   
    draw_text(0,0, Graphics.width, line_height, txt,1)
  end
  
  def set_opacity
  self.opacity = 0
 end
 
Joined
Mar 23, 2016
Messages
12
Reaction score
0
First Language
English
Primarily Uses
I got the game to run again, i ALMOST got it, i have some tweaking to do and it should work, when its done ill send the pic and the script, and possibly get help on more scripting
 
Joined
Mar 23, 2016
Messages
12
Reaction score
0
First Language
English
Primarily Uses
This is the best i can do so far, i dont know how to have alternating/changing text (help with that would be nice please :) ) so here it is


class Scene_Gameover < Scene_Base
alias galv_chigoo_gotext_start start
def start
galv_chigoo_gotext_start
create_txt_window
end

def create_txt_window
@txt_window = GoText_Window.new
end
end

class GoText_Window < Window_Base
def initialize
super(0, 300, Graphics.width, fitting_height(1))
if(Font.exist?("8-bit Operator+"))
contents.font = Font.new("8-bit Operator+", 25)
draw_message
set_opacity
end
end

def draw_message
txt = "You cannot give up just yet... "+"Michael, Stay Determined..."
draw_text(0,0, Graphics.width, line_height, txt,1)
end

def set_opacity
self.opacity = 0
end
end


Gameover 5.png
 
Joined
Mar 23, 2016
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Does anyone else know what else i can do to the script to make alternating/transition/changing text
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,551
Members
137,837
Latest member
Dabi
Top