Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> Quick question involving textboxes
vvalkingman
post Oct 16 2012, 11:22 AM
Post #1


The Traveling Bard ;)
Group Icon

Group: Revolutionary
Posts: 210
Type: Developer
RM Skill: Intermediate




I know this is probably simple and I can't believe I haven't figured it out as of yet...but when you put up a textbox is there a way to move on to the next line without the player having to mash enter? Example:

I'm attempting a cutscene and I want text boxes to pop up but I don't want the player to be able to just mash through it. Is there any other way to do this than having a picture with text on it already and just timing THAT with the wait command?

I am using rpg maker xp.


__________________________

Thank you X-M-O for my sexy new banner! ;)

Project I'm currently racking my brain on:
"Modern Witch" Project(tentative name): 5% done
Goshiki: The Five Paths: 40% done

Projects on the backburner:
The Great Thief of Mango City: 5% done
Knights of the Black Gate: 10% done
The Venting: 74% done
Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies
Jens of Zanicuud
post Oct 17 2012, 08:19 AM
Post #2


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




You'll need a script to do what you need.
In fact, there is no way to force a window closing without modifying the Window_Message class.
I'll make an attempt and post it here while finished.

Jens

EDIT:

CODE
#==============================================================================
#=#============================================================================
# #** Jens of Zanicuud window control script
# #   -version 0.9
# #   -free use, just credit
# #   -free customization, however, posting on RRR the modified version is
# #    mandatory
# #   -you can find me on www.rpgrevolution.com
#=#============================================================================
#==============================================================================

#==============================================================================
# ** Message_Win module
#==============================================================================
module Message_Win
#==============================================================================
# * Invariables
#==============================================================================
  CANT_SKIP_SWITCH_ID = 1 #id of the switch. If this switch is active, message
                          #can't be skipped with Enter or Space
#==============================================================================
# * skip_message - forces the message window to close
# (call it this way: call script - Message_Win.skip_message)
#==============================================================================
  def Message_Win.skip_message
    #if there is a message window
    if $scene.is_a?(Scene_Battle) or
      $scene.is_a?(Scene_Map)     and
      $scene.message_window != nil
      #terminate message
      old_switch = $game_switches[CANT_SKIP_SWITCH_ID]
      $game_switches[CANT_SKIP_SWITCH_ID] = false
      $scene.message_window.terminate_message
      $game_switches[CANT_SKIP_SWITCH_ID] = old_switch
    end
  end
end

#==============================================================================
# *** WINDOWS
#==============================================================================
# edited: Window_Message
#==============================================================================

#==============================================================================
# ** Window_Message
#==============================================================================

class Window_Message < Window_Selectable
#==============================================================================
# * aliases
#==============================================================================
  alias skip_win_terminate_message terminate_message
#==============================================================================
# * terminate_message
#==============================================================================
  def terminate_message
    if $game_switches[Message_Win::CANT_SKIP_SWITCH_ID]
      return
    else
      skip_win_terminate_message
    end
  end
end

#==============================================================================
# *** SCENES
#==============================================================================
# edited: Scene_Battle
# edited: Scene_Map
#==============================================================================

#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle
#==============================================================================
# * public instance variables
#==============================================================================
  attr_reader :message_window
end

#==============================================================================
# ** Scene_Map
#==============================================================================
class Scene_Map
#==============================================================================
# * public instance variables
#==============================================================================
  attr_reader :message_window
end


To close the window via script, use a call script like this:

CODE
Message_Win.skip_message


To prevent the player from skipping the message, choose a switch, set the id in the constant named CANT_SKIP_SWITCH_ID and turn it ON.
While the switch is ON, player can't skip messages.

I hope this can help, ask for troubleshooting anytime smile.gif

Jens


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   



Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 23rd May 2013 - 06:05 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker