Spriteset_Map.prototype.ground_molasses;Spriteset_Map.prototype.createLowerLayer = function() { Spriteset_Base.prototype.createLowerLayer.call(this); this.createParallax(); this.createTilemap(); this.createCharacters(); this.createShadow(); this.create_molasses(); this.createDestination(); this.createWeather();};Spriteset_Map.prototype.create_molasses= function() { this.ground_molasses = new Sprite(); this.ground_molasses.bitmap = ImageManager.loadOverlay($gameSystem.molasses_name); this.addChild(this.ground_molasses);};In the code above, I created a molasses but the thing is, its a picture. I want it that it behaves like a parallax where I can step on it, and my character is above the picture, but covers my tiles. Is there something wrong here? Also, addChildAt doesn't help me index the proper location for it so the character can step on it.
Bypassing Spriteset_Map to add objects above the tiles?
Learning JavascriptI found that in Spriteset_Map, the _tilemap object has code for z position behavior. So adding child sprites to that z values work for positioning them in between map objects:
this._tilemap.addChild()
I implemented this in my Layer Graphics plugin so users could put images in between any of the layers. Feel free to look and see what I mean
this._tilemap.addChild()
I implemented this in my Layer Graphics plugin so users could put images in between any of the layers. Feel free to look and see what I mean
Hi Galv. It kinda works, but the characters are flickering when you touch the molasses. Is there something I missed?
Not sure what you mean by flickering. Did you try giving it a lower z value perhaps?
Oh, you're right, I used .z to 2 and it works perfectly, thanks Galv! It's a big help. This prob is now solved!
Original thread: https://forums.rpgmakerweb.com/threads/bypassing-spriteset_map-to-add-objects-above-the-tiles.50228/