Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> 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
   
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
   
vvalkingman
post Nov 6 2012, 04:23 PM
Post #3


The Traveling Bard ;)
Group Icon

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




Dude...your name is going to be in big bold letters in the credits for Monk lmao you are so frickin' awesome! *gives cookie*

edit: So how do you do this in the event? Do you have a text, have wait 20 frames, then script call? or script call, text, 20 frames? Neither work just wondering lol i'm probably missing something simple...

I also noticed that when you call the script no other text boxes after that pop up.

This post has been edited by vvalkingman: Nov 6 2012, 04:57 PM


__________________________

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
   
Jens of Zanicuud
post Nov 7 2012, 09:13 AM
Post #4


Dark Jentleman
Group Icon

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




It's more simple to do than to say, so I'll proceed with an example...
Basically, you'll need two events (or an event and a common event):

Main:
Event #1
Trigger: Parallel


1. Switches[CANT_SKIP_SWITCH_ID] = ON
2. Switches[id] = ON (a number you like) #activate this switch before every message you want to autoskip
2. Message: Hello!
4. rest of the event...
5. Switches[CANT_SKIP_SWITCH_ID] = OFF

Message autoskip:
Common Event or Event #2
Trigger: Parallel - Switch[id] == ON


1. Wait X frames
2. Script call: Message_Win.skip_message
3. Switch[id] == OFF

Feel free to ask if I wasn't clear enough.

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: 22nd May 2013 - 11:12 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker