Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> Need help making a window_selectable script
vvalkingman
post Aug 25 2012, 05:44 AM
Post #1


The Traveling Bard ;)
Group Icon

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




So, I am attempting to make a custom skill status page. The idea is that I have five different katas each with three techniques that you learn over time. What I want to do is make it so that if you don't know a kata then that kata is greyed out and not able to be selected. When you select a kata it will open the skill window and only show the skills associated with that kata. I've got a long way to go before I can get what I want....for now I'm having issues with just making the selectable window below the Window_skillstatus. Here is what I've got so far:

CODE
#==============================================================================
# ** Window_KataStatus
#------------------------------------------------------------------------------
#  This window displays the user's kata status on the skill screen.
#==============================================================================

class Window_KataStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 128, 640, 64)
    self.index = 0
    @item_max = 5
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.draw_text(0,0,100,32,"Lightning")
    self.contents.draw_text(128,0,100,32,"Fire")
    self.contents.draw_text(256,0,100,32,"Water")
    self.contents.draw_text(384,0,100,32,"Earth")
    self.contents.draw_text(512,0,100,32,"Wind")
  end
#--------------------------------------------------------------------------
# * Check_Input
#--------------------------------------------------------------------------
def check_input
if Input.trigger?(Input::C)
$window.dispose
if self.index == 0
#skill window for lightning
elsif self.index == 1
#skill window for fire
elsif self.index == 2
#skill window for water
elsif self.index == 3
#skill window for earth
elsif self.index == 4
#skill window for wind
end
end
end
end


The problem I am having is that I can't select the other options. It's like the first option is the entire line of lightning,fire,water,earth, and wind and I have four other blank options going down. How can I make it so that I can select the other options horizontally instead of vertically? Also, if you have any idea how I can have the option greyed out until a switch is on, that would be great. Thanks for the help in advance! smile.gif


__________________________

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
   



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: 19th June 2013 - 07:25 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker