Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # Don't remove this header!
- #==============================================================================
- # Picture Z Changer script By Black Mage (Credit required to use)
- # Current Version : 1.1
- # https://burningwizard.wordpress.com/2019/04/18/picture-z-changer-script/
- #
- # This script can change z value of choosen picture called via command event.
- #
- # This script is licensed under CC BY 3.0
- # https://creativecommons.org/licenses/by/3.0/
- #==============================================================================
- #==============================================================================
- # Changelog
- #==============================================================================
- # Version 1.1
- # - Rewrite some codes.
- #
- # Version 1.0
- # - Initial version.
- #==============================================================================
- #==============================================================================
- # How to use the script
- #==============================================================================
- # Put this script on your project.
- #
- # Use these command on script call from event command to change the z value of
- # a picture:
- #
- # change_picture_z(picture_id, value)
- #
- #==============================================================================
- #------------------------------------------------------------------------------
- # * Beyond this is the sacred land of code. You need programming qualification
- # to dwelve deeper, or it'll cause many unnecessary problems. Proceed on your
- # own risk.
- #------------------------------------------------------------------------------
- class Game_Picture; attr_accessor :z_value; end
- class Game_Interpreter
- def change_picture_z(id, value)
- if SceneManager.scene_is?(Scene_Battle)
- a = $game_troop.screen.pictures
- elsif SceneManager.scene_is?(Scene_Map)
- a = $game_map.screen.pictures
- end
- return if a.nil?
- a[id].z_value = value
- end
- end
- class Sprite_Picture < Sprite
- alias black_u_p update_position
- def update_position
- black_u_p; self.z = @picture.z_value if @picture.z_value != nil
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement