Screenshot
(http://imagesload.net/daten_no/1206325809_scsh139.jpg)
Credits
Anleitung
Um das Bild anzuzeigen in den Eventcommand "Script" schreiben:
l = $game_map
l.sl_name = "light01" # Dateiname (in Graphics/System)
l.sl_blend_type = 1 # Blending (0 = Normal, 1 = Add, 2 = Sub)
l.sl_opacity = 128 # Transparenz (0 bis 255)
Um das Bild zu enfernen, das hier
l = $game_map
l.sl_name = "" # Dateinamen leerlassen!
ebenfalls in den Eventcommand "Script" schreiben.
Außerdem wird das Bild bei jeden Mapwechsel wieder gelöscht.
Skript
#==============================================================================
# ** [STR13] Spotlight (von star) (Version 1.1 vom 28. Februar 2008)
#------------------------------------------------------------------------------
# Mitte des LE ist gleich Positions des Players (gut für Laterne)
#==============================================================================
if false
# Das folgende wird in den Eventcommand "Script" geschrieben:
l = $game_map
l.sl_name = "light01" # Dateiname (in Graphics/System)
l.sl_blend_type = 1 # Blending (0 = Normal, 1 = Add, 2 = Sub)
l.sl_opacity = 128 # Transparenz (0 bis 255)
#-----------------------------------------------------------------------------
end
#==============================================================================
# ** Game_Map
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# * Instanzvariablen
#--------------------------------------------------------------------------
attr_accessor :sl_name
attr_accessor :sl_blend_type
attr_accessor :sl_opacity
#--------------------------------------------------------------------------
# * Setup
# map_id : map ID
#--------------------------------------------------------------------------
alias setup_str13 setup
def setup(map_id)
setup_str13(map_id)
@sl_name = ""
@sl_blend_type = 1
@sl_opacity = 128
end
end
#==============================================================================
# ** Spriteset_Map
#==============================================================================
class Spriteset_Map
#--------------------------------------------------------------------------
# * Create Light
#--------------------------------------------------------------------------
def create_s_light
@s_light = Sprite.new(@viewport2)
@s_light.z = 0
@s_light.visible = false
end
#--------------------------------------------------------------------------
# * Dispose Light
#--------------------------------------------------------------------------
def dispose_s_light
@s_light.dispose
end
#--------------------------------------------------------------------------
# * Update Light
#--------------------------------------------------------------------------
def update_s_light
if @s_light_name != $game_map.sl_name
@s_light_name = $game_map.sl_name
if @s_light.bitmap != nil
@s_light.bitmap.dispose
@s_light.bitmap = nil
end
if @s_light_name != ""
@s_light.bitmap = Cache.system(@s_light_name)
@s_light.visible = true
@s_light.ox = @s_light.bitmap.width / 2
@s_light.oy = @s_light.bitmap.height / 2
end
Graphics.frame_reset
end
@s_light.opacity = $game_map.sl_opacity
@s_light.blend_type = $game_map.sl_blend_type
@s_light.x = $game_player.screen_x
@s_light.y = $game_player.screen_y
end
#--------------------------------------------------------------------------
# * Create Parallax
#--------------------------------------------------------------------------
alias create_parallax_str13 create_parallax
def create_parallax
create_parallax_str13
create_s_light
end
#--------------------------------------------------------------------------
# * Dispose of Parallax
#--------------------------------------------------------------------------
alias dispose_str13 dispose
def dispose
dispose_s_light
dispose_str13
end
#--------------------------------------------------------------------------
# * Update of Parallax
#--------------------------------------------------------------------------
alias update_str13 update
def update
update_str13
update_s_light
end
end
Links
als Textdatei anzeigen oder downloaden (http://rpgvx.bplaced.net/scripts/star/13.txt)
Beispielgrafik anzeigen oder downloaden (http://imagesload.net/daten_no/1206326379_black.jpg)
star's VX script material (http://strrgssvx.blog.shinobi.jp/Entry/23)