Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Possible to change battler opacity?

Hi,

Is there a way to change the battlers graphic opacity?
I'm want to change a special battlers opacity whenever he uses a special skill but i can't quite figure out how to do it. :sad:
so i wonder if anyone knows if it's possible to change the battlers opacity somehow.  :tongue2:
Thanks,

//Gando
 
This seems to work...

I created a state called "Dim" (17),
Then set the skill to add that state
Then I modified this section of Sprite_Battler (starts at line 65)
Code:
    # If actor which should be displayed
    if @battler.is_a?(Game_Actor) and @battler_visible
      # Bring opacity level down a bit when not in main phase
      if $game_temp.battle_main_phase and !@battler.state?(17)
        self.opacity += 3 if self.opacity < 255
      else
        if @battler.state?(17)
          self.opacity -= 3 if self.opacity > 127
        else
          self.opacity -= 3 if self.opacity > 207
        end
      end
    end

Edit the '(17)'s if you use a different state,
Edit the '127' to set how much opacity you want
 
Thanks for the reply Brewmeister! :smile:

Yeah, it works, in general..
But silly me forgot to mention that i'm using minkoffs animated battlers :blush:, and it doesn't seem to work then.  :down:
It does work though if i wouldn't be using minkoffs animated battlers.

Is the problem Minkoffs script or is it something else? :shock:
Thanks!

//Gando
 
Yes, Minkoff's script probably has it's own Sprite_Battler class, which takes precedence over the default class.
So, it's not even evaluating those changes. If you can find that section in his scripts, and make the modificaton, it should work.  I've never looked at Minkoff's battle system. Although I've heard good reviews.

Be Well
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top