Haflway opacity with bush

Juggy

Villager
Member
Joined
Jul 21, 2015
Messages
6
Reaction score
0
Primarily Uses
Hi everyone, been following threads without an account for a while, but now I'm having an issue myself. I'm trying to make the opacity of the half body completely invisible when walking in trees outside on my world map.  In the Game_CharacterBase script, theres a part that controls the height, but not the opacity level.

I've attached a picture of what I'm trying to achieve.

bush_issue.gif
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


If there's not any code that covers the opacity itself, it's probably part of the hidden Sprite class that we don't have code for. I can't check now as I don't have Ace with me.
 

dayhjawk

Veteran
Veteran
Joined
Jul 5, 2015
Messages
107
Reaction score
12
First Language
English
Primarily Uses
I myself have been tring to solve this. If you try and change the opacity of the grass, it ends up doing so for the whole 32x32 tile. So you end up with grass covering the whole player. 
 

cremnophobia

Veteran
Veteran
Joined
Dec 10, 2013
Messages
216
Reaction score
97
Primarily Uses
RGSS 2 and 3 have Sprite#bush_opacity / Sprite#bush_opacity=. However that attribute isn't used by the default VX Ace scripts. You have to modify Game_CharacterBase and Sprite_Character.
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
854
First Language
English
Primarily Uses
RMMV
This scriptlet should work :

Code:
#==============================================================================# ** Game_CharacterBase#==============================================================================class Game_CharacterBase    #--------------------------------------------------------------------------  # * Public Instance Variables  #--------------------------------------------------------------------------  attr_accessor :bush_opacity               # bush_opacity  #--------------------------------------------------------------------------  # * ALIAS - Initialize Public Member Variables  #--------------------------------------------------------------------------  unless method_defined?(:bush_HtCDOT4g_gcb_init_public_members)    alias_method(:bush_HtCDOT4g_gcb_init_public_members, :init_public_members)  end  def init_public_members(*args, &block)    bush_HtCDOT4g_gcb_init_public_members(*args, &block)        # Default 'bush_opacity' is 128; Maximum is 255    @bush_opacity = 0  endend # Game_CharacterBase#==============================================================================# ** Sprite_Character#==============================================================================class Sprite_Character < Sprite_Base  #--------------------------------------------------------------------------  # * ALIAS - Update Other  #--------------------------------------------------------------------------  unless method_defined?(:bush_GOpkYjh1_sc_update_other)    alias_method(:bush_GOpkYjh1_sc_update_other, :update_other)  end    def update_other(*args, &block)    bush_GOpkYjh1_sc_update_other(*args, &block)        self.bush_opacity = @character.bush_opacity  end  end # Sprite_Character
 

Juggy

Villager
Member
Joined
Jul 21, 2015
Messages
6
Reaction score
0
Primarily Uses
Thanks!! This is exactly what I needed. Wow, i've trying to solve this for 2 months now. Thanks you!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,847
Messages
1,016,972
Members
137,561
Latest member
JaCrispy85
Top