Shadows
Versi: v1.1
Tipe: Map Graphics
PengenalanUdah sekian lama gak ngesubmit script ke umum
Ini sekedar tambah bayangan doang untuk karakter di map.
Fitur- Simpel
- Gak banyak rewel
- Adaptatif
Screenshots
DemoNo need tentunya.
Scripts - Code:
-
#===============================================================================
# Shadows v1.1 ~ wltr3565
# This is solely for putting shadows for map sprites. Only that simple.
# Crediting is prefered.
#===============================================================================
module WLTR
module SHADOW_CONFIG
GRAPHIC_DEFAULT = "shadow00" # The shadow's image. Put it in
# Graphics/Characters folder.
end
end
class Game_Character
include WLTR::SHADOW_CONFIG
attr_accessor :shadow_on
attr_accessor :shadow_graphic
alias ini_shadow initialize
def initialize
ini_shadow
@shadow_on = true
@shadow_graphic = GRAPHIC_DEFAULT
end
def pure_screen_y
result = ($game_map.adjust_y(@real_y) + 8007) / 8 - 1000 + 32
result -= 4 unless object?
return result
end
end
class Sprite_Character < Sprite_Base
alias upd_shadow update
def update
upd_shadow
if @shadow_sprite == nil
create_shadow
end
update_shadow
end
def create_shadow
@shadow_sprite = Sprite.new(viewport)
@shadow_sprite.bitmap = Cache.character(@character.shadow_graphic)
@shadow_sprite.ox = @shadow_sprite.bitmap.width / 2
@shadow_sprite.oy = @shadow_sprite.bitmap.height / 2
update_shadow
end
def update_shadow
@shadow_sprite.visible = @character.shadow_on
@shadow_sprite.visible = false if !self.visible or @character_name == ""
@shadow_sprite.x = x
@shadow_sprite.y = @character.pure_screen_y
@shadow_sprite.z = z - 100
end
alias shadow_dispose dispose
def dispose
@shadow_sprite.dispose
shadow_dispose
end
end
#===============================================================================
#
# END OF SCRIPT
#
#===============================================================================
Terms of UseKredit aku aja cukup.
Catatan:
Sediain sendiri ya gambar bayangannya
Sebetulnya udah ada kok di Tankentai.