Pemflip Picture
Versi: 1.0
Tipe: Event Support
PengenalanSebetulnya sekadar kebutuhan tim, terutama ngeflip portrait (picture). Sayang eventnya RMVX gak mendukung. Script ini menolong hal tersebut. Kalau pakai cara ini lebih hemat size gamenya, gak perlu 2 versi gambar sekaligus dalam 1 game
PemakaianLihat di script.
Screenshots Terlihat kurang menyakinkan? Tidak, ini sungguhan.
Scripts- Spoiler:
- Code:
-
=begin
================================================================================
Picture Flipper v1.0
by wltr3565
================================================================================
Barely only for my team's needs, especially flipping portraits (pictures). It's
sad that RMVX doesn't feature picture flipping. This script can help it.
================================================================================
How to Use:
Use these script commands at your needs:
- flip(id, value = false)
id is the picture's id. Value is the value between true or false. The picture
will be flipped if the value is true. Otherwise, not.
- reset_flips
Makes all pictures unflipped, return to normal.
================================================================================
Terms of Use:
Crediting me is preferable. But claiming this script as your own work is absurd.
================================================================================
Notes:
While flipping pictures, especially portraits, well, make sure that it's not
weird while flipped. Artists should understand what I meant though.
================================================================================
=end
class Game_Picture
attr_accessor :mirror
def initialize(number)
@number = number
@name = ""
@origin = 0
@x = 0.0
@y = 0.0
@zoom_x = 100.0
@zoom_y = 100.0
@opacity = 255.0
@blend_type = 1
@duration = 0
@target_x = @x
@target_y = @y
@target_zoom_x = @zoom_x
@target_zoom_y = @zoom_y
@target_opacity = @opacity
@tone = Tone.new(0, 0, 0, 0)
@tone_target = Tone.new(0, 0, 0, 0)
@tone_duration = 0
@angle = 0
@rotate_speed = 0
@mirror = false
end
end
class Sprite_Picture < Sprite
def update
super
if @picture_name != @picture.name
@picture_name = @picture.name
if @picture_name != ""
self.bitmap = Cache.picture(@picture_name)
end
end
if @picture_name == ""
self.visible = false
else
self.visible = true
if @picture.origin == 0
self.ox = 0
self.oy = 0
else
self.ox = self.bitmap.width / 2
self.oy = self.bitmap.height / 2
end
self.x = @picture.x
self.y = @picture.y
self.z = 100 + @picture.number
self.zoom_x = @picture.zoom_x / 100.0
self.zoom_y = @picture.zoom_y / 100.0
self.opacity = @picture.opacity
self.blend_type = @picture.blend_type
self.angle = @picture.angle
self.tone = @picture.tone
self.mirror = @picture.mirror
end
end
end
class Game_Interpreter
def flip(id, value = false)
$game_map.screen.pictures[id].mirror = value
end
def reset_flips
for picture in $game_map.screen.pictures
picture.mirror = false
end
end
end
Creditswltr3565