Change Upper Layer Opacity (Tileset)

tomkay91

Villager
Member
Joined
Jul 16, 2016
Messages
7
Reaction score
4
First Language
German
Primarily Uses
RMMV
Hello,

can you guys give me a hint where I can find the tilemap layers objects of my game map?
I didn't find anything in the debug tools. I tried this.$gameMap and other object but I had no luck…
I want to change the opacity of e.g. the upper layer (above player).

Is there a way to debug this on runtime or anyway to manipulate it?

I have little experience with PIXI and RPG MAKER MV'S core.
So please don't be offended by my lack of knowledge!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,400
Reaction score
7,222
First Language
German
Primarily Uses
RMMV
I think you should give a better explanation of what you want to do (in game terms) instead of how you want to do it (change opacity).

Because I think you mixed up several things here and try to go at it from the wrong way...

Even the regular upper layer of the map is below player - the only tiles above the player are star tiles, and those are placed there by override because their regular tile position is below player.

And why do you want to change the opacity by javascript? For most uses you can simply change it in the tileset picture, or set it as an event and then change the opacity of the event (for which there are event commands, no need to go into javascript either)
 

tomkay91

Villager
Member
Joined
Jul 16, 2016
Messages
7
Reaction score
4
First Language
German
Primarily Uses
RMMV
Thank you for your reply,

in game terms: When a switch is on true I want to fade out (300ms) the roof of a house. I can do this but it has no tweening, no transition effect. I want a smooth transition.


Technically I use the TileD plugin and I've configured a layer for the roof. I just try to find the entity in the debug bar and try to manipulate the opacity (or alpha value).

 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
876
Reaction score
587
First Language
English
Primarily Uses
RMMV
The event bitmaps and tile layers are in the ...
PHP:
SceneManager._scene._spriteset._tilemap
Just the tile flags are in...
PHP:
SceneManager._scene._spriteset._tileset
I'll have to tinker with this to learn how to change opacity on the upper layer.

EDIT:
Ok. I tinkered with it and I learned how to change the "alpha" on the star-passable tiles (upper layer) but it only takes 1 and 0.
PHP:
SceneManager._scene._spriteset._tilemap.children[0].tilemap.upperZLayer.alpha = 0;
 
Last edited:

tomkay91

Villager
Member
Joined
Jul 16, 2016
Messages
7
Reaction score
4
First Language
German
Primarily Uses
RMMV
This effect is exactly what I have now in my project. It works – but I like to see a smooth transition :p
I'm not sure about PIXI but I try to use an extra filter or something for this layer. Maybe I can just force it to change the opacity/alpha.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,377
Reaction score
1,553
First Language
English
Primarily Uses
RMMV
You can get interim effects by making it a fraction of 1; you can set it to 0.9, 0.8, 0.7 etc.
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
876
Reaction score
587
First Language
English
Primarily Uses
RMMV
I'm messing with the bitmaps right now in ShaderTilemap, but it seems upper layer bitmaps share the same sprite or whatever so decreasing opacity on one decreases opacity on all.
 

tomkay91

Villager
Member
Joined
Jul 16, 2016
Messages
7
Reaction score
4
First Language
German
Primarily Uses
RMMV
My TileD layers use "CompositeRectTileLayer". Apparently they don't use parameters for use of opacity/alpha.

Code:
var layer = new PIXI.tilemap.CompositeRectTileLayer(zIndex, [], useSquareShader);
YED_Tiled.js (TileD plugin)

Code:
function CompositeRectTileLayer() {
    PIXI.Container.apply(this, arguments);
    this.initialize.apply(this, arguments);
}
pixi-tilemap.js
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,114
Reaction score
11,464
First Language
English
Primarily Uses
RMVXA
Maybe Iavra's Animate Everything plugin would do what you want.
I use the Ace version of this, and it makes beautifully smooth fadeout/fadein effects, as well as other things.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Finally did a test of sorts for the opening of my game... ... including this shot here.
My current status!?
It might be... QUAKE!!! :o
At least that was true several hours ago. :p
Quexp wrote on Shaz's profile.
I absolutely love your profile/pic! :kaoluv:
Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
I made a battle results screen for my minigame.. any feedback? :)

Forum statistics

Threads
100,686
Messages
978,416
Members
132,310
Latest member
hnhat
Top