Main Menu
  • Welcome to The RPG Maker Resource Kit.

[Resolved] status as icons?

Started by blazinhandle, February 22, 2007, 05:42:51 AM

0 Members and 1 Guest are viewing this topic.

blazinhandle

anyone know where i can get a script that will display a character's status as icons (i already have ones made) rather than the name? Like if a character is stunned it'll show a lightning bolt, but if he's also slow it'll show 2 icons? Thanks!

modern algebra

It's late so I'm not really thinking, but can't you just make the icon into an animation and just have the state activate that animation?

blazinhandle

Quote from: modern algebra on February 22, 2007, 05:46:10 AM
It's late so I'm not really thinking, but can't you just make the icon into an animation and just have the state activate that animation?


hmmm, well i'm looking to display the icon(s) in the battle status window and replace those for the text.

italianstal1ion

The images = [] is where you put your images named after your status'. Ex: you have Poison as a status, have a picture in the icons folder called Poison.

def make_battler_state_images(battler)
    images = []
    for i in battler.states
      images.push(RPG::Cache.icon($data_states[i].name))
    end
   
    return images
  end
 
  def draw_actor_state(actor, x, y, width = 120)
    images = make_battler_state_images(actor)
    for i in 0...images.length
      rect = Rect.new(x + (i * 26), y, self.width - 32, 24)
      self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
      self.contents.blt(x + (i * 26), y, images[i], Rect.new(0, 0, 24, 24), 255)
    end
  end

blazinhandle


fadark


just so everyone knows, im 15 years old.

radha2g

#6
I cant believe how quick was that
very useful for showing all status, just what i was looking for but with pictures :)
thanks
by the way, i didnt add any images name to 'images' variable and it worked just fine jeje

Quote from: fadark on March 02, 2007, 12:10:43 AM
It doesn't work for me.  :(
you have to add the code to Window_Base before the last 'end', and add the images with the name of the status to the Icons folder. They have to be png, i think


fadark


just so everyone knows, im 15 years old.

blazinhandle


fadark


just so everyone knows, im 15 years old.

blazinhandle

most pictures in RMXP use .png files for example Arshes character sprite is a .png (Arshes.png).

fadark


just so everyone knows, im 15 years old.

Irgna

I did it correctly but I keep getting an error message... I followed what y'all said exactly. Any idea what I might be doing wrong? I can't seem to do anything that has to do with scripts without completely screwing it up... :'(
PROPERTY OF TEABAG!!! ALL HAIL TEABAG!!!