RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Resolved] status as icons?

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 88
Menu & Battle System Guru
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!
« Last Edit: February 26, 2007, 07:05:17 PM by blazinhandle »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
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?

***
Rep:
Level 88
Menu & Battle System Guru
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.

***
Rep:
Level 88
Smarter than the average bear
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.

Code: [Select]
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

***
Rep:
Level 88
Menu & Battle System Guru
sweet! thanks man!

****
Banned
Rep:
Level 88
I'm basically Yoda's brother
It doesn't work for me.  :(

just so everyone knows, im 15 years old.

**
Rep: +0/-0Level 87
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

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
« Last Edit: March 07, 2007, 05:03:49 PM by radha2g »


****
Banned
Rep:
Level 88
I'm basically Yoda's brother
whats png mean?

just so everyone knows, im 15 years old.

***
Rep:
Level 88
Menu & Battle System Guru
it's the file extension

****
Banned
Rep:
Level 88
I'm basically Yoda's brother
whats that?

just so everyone knows, im 15 years old.

***
Rep:
Level 88
Menu & Battle System Guru
most pictures in RMXP use .png files for example Arshes character sprite is a .png (Arshes.png).

****
Banned
Rep:
Level 88
I'm basically Yoda's brother
okay thanks it works! :D

just so everyone knows, im 15 years old.

****
Rep:
Level 88
Back with RMVX!
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!!!