Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> [VX]Window Selectable issues, Selectable States scene
DUFUTA
post Aug 11 2012, 08:35 PM
Post #1


Level 5
Group Icon

Group: Member
Posts: 60
Type: Musician
RM Skill: Intermediate




THE SCRIPT
CODE
class Window_States < Window_Selectable
  
  def initialize
    super(140, 120, 400, 300)
    @actor = $game_party.members[0]
    @column_max = 8
    self.index = 0
    refresh
  end
  
  #Getting States
  def active_states
    @active_states = []
    for active_state in @actor.states
      @active_states.push(active_state)
    end
  end
  
  #Drawing Active State
  def draw_active_state
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    state = @active_states[index]
    draw_actor_state(@actor, rect.x, rect.y )
  end
  
      
      
  #Refresh
  def refresh
    active_states
    @item_max = @active_states.size
    for i in 0...@item_max
      draw_active_state[i]
    end
  end
end


I'm trying to make a scene in my project wherein one is able to view the current states they're under and can select each one, bringing them up in a 'details' window which tells the cure for the state, how long the state lasts, etc. I can make the 'details' window just fine. But I am pulling my hair out trying to figure out exactly how to implement the above window_selectable to work.

I've read this topic here countless times:

THIS PAGE

I've also read through the countless window_selectables in the default scripts.

And though I get the properties of the window just fine, I can't figure out exactly how to implement it. I get the states icons drawn, but for some reason the cursor just will not move. So, I was wondering if maybe someone could help me along, maybe draw out some kind of sample as to how they should be laid out.

I use this line in the scene to set the window as active:
CODE
@window_states.active = true


I watched a few GubiD tutorials for that information. And still, I'm stuck. I want to be able to make selectable windows cause there are a few more I'll be attempting. I started on this one, because it seemed these easiest of my ideas.

So yeah, How?

There's another thing to:

Is there anyway to remove the little value on the given states? I just need the icons.

Any help would be greatly appreciated.
Go to the top of the page
 
+Quote Post
   

Posts in this topic


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 May 2013 - 10:42 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker