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
   
 
Start new topic
Replies
DUFUTA
post Aug 11 2012, 09:20 PM
Post #2


Level 5
Group Icon

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




Well, diamond and platinum. Correct me if I'm wrong, but the window_command is more or less a list. Whereas this particular script will display more like a the window_item default script. Where as I want there to be rows and columns. That's why I chose selectable. I've got this little program which spawns window_selectables and I've used it before, but it creates more of the command-ish kind. And I don't really want to use it because I've been advancing my scripting knowledge like crazy lately. I've gotten pretty good at scenes and base windows. These darn Selectables are a killer though.

Anyway, thanks for the encouragement. I'll look over the command window again, but I really believe selectable is the way to go here.

If you can tell me 'why' you think command is better, I'm willing to hear you out and consider it.
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: 18th May 2013 - 06:59 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker