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.

Refresh time

Nava

Member

how do i make the refresh time of my text increase. i have text boxes created with my script and they take like 30 seconds to go away is there a way to shorten the time on that? thanx in advance
 

Nava

Member

well. in my script i have it create message boxes and messages in the boxes obviously. and it takes quite a bit of time for them to dissapear, so i was wondering if there was a way or syntax i should say that lets me set the time it takes to refresh. or maybe a syntax that allows me to push enter like regular text and have it dissapear. i hope that this explanation helps to describe what i am looking to do.
 

Nava

Member

def initialize
super(0, 308, 621, 150)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = 'Arial'
self.contents.font.size = 24
refresh
end


def refresh
self.contents.clear
if $variable * 53 != @@password
refresh_3
else
refresh_2
end
end


def refresh_2
self.contents.clear
self.contents.font.color = text_color(6)
self.contents.draw_text(0, 0, 400, 32, 'Thank you, the gate is now open.')
end


def refresh_3
self.contents.clear
self.contents.font.color = text_color(6)
self.contents.draw_text(0, 0, 400, 32, 'Im sorry but those credentials arent')
self.contents.draw_text(0, 25, 400, 32, 'valid, please come back and try again')
self.contents.draw_text(0, 50, 400, 32, 'in a moment when the screen refreshes.')
end
 
First of all, why do you have self.contents.clear in the refresh_2 and refresh_3 methods? The contents get cleared in the refresh method. Second of all, are you disposing the window at the end of your scene?
 
Do you dispose of your windows at the end of the main method? For example:

Code:
def main
  @window1 = Window_Whatever1.new
  @window2 = Window_Whatever2.new
  loop do
    Graphics.update
    Input.update
    update
    if $scene != self
      break
    end
  end
[color=red]  @window1.dispose
  @window2.dispose[/color]
end
 

Nava

Member

all i did was make th text appear after it does the check. so if $variable * 53 != @@password then it does refresh_3 and all the tutorial i used to make text appear had thet self.contents.clear at the beginning of them it was by dubealex i didnt make a scene for it and i probably should. even thoough im not quite sure how to i kan always try
 

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