Change Battlers Opacity depending on State

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses
The title says it all,
I'm looking for a script that changes the sprite opacity of the Battler who is under certain State.
Can anyone help me with that?

Thanks in advance! :)
 

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses
*Little bump*
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
Do you happen to use any battle system script that shows actor sprite or it is vanilla?
 

Harosata

Dramatic Lightning's BFF
Veteran
Joined
Aug 20, 2015
Messages
246
Reaction score
70
First Language
English
Primarily Uses
RMVXA
Before, I changed the size of sprites, so it should be easy to change the opacity:

Code:
class Sprite_Battler < Sprite_Base
  alias dl_update_effect update_effect #alias means run this method on top of the originial
  def update_effect
    if @battler.state?(GHOST) #Change this to your state id
      self.opacity = 100 #Opacity is 0-255
    else #If you don't have this state, return opacity to normal
      self.opacity = 255
    end
    dl_update_effect #This alias nickname runs the original update_effect
  end
end
 

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses
@Harosata Thank you very much! It worked perfectly! :)
@TheoAllen I'm using vanilla. Harosata solved it, but thanks anyway!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top