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
6,244
Reaction score
7,629
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
248
Reaction score
76
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!
 

Latest Threads

Latest Posts

Latest Profile Posts

Thinking that if I get MZ, I'll work on a new Project. How about instead of just an RPG, I make it episodic, like an anime? You might even get fanservice. Oh, but I need the right costume for the character.
"but what even is an API??"
Poppet Quest stats so far.. 61 views, 20 downloads, 3 reviews, 1 comment, 4 followers gained.... Hmm...
From a content creation standpoint, games really have awful traction. At least the experiment is interesting, time to see what adding Twitter into the mix does. Maybe the supposed 1,290 followers I have on it will prove useful. Then I'll test out Insta. :barf:
I've been trying to work on more "complete" artworks and so far... I'm in so much pain Its really annoying how easy is to completely mess up the proportions and perspectives, but I guess I can only keep practicing
xW1ByDU.jpg

Forum statistics

Threads
113,602
Messages
1,076,133
Members
147,602
Latest member
CertainPerson
Top