Bathroom mirror reflection

The bathroom mirror now reflects niko, with the aide of these scripts
This commit is contained in:
Michael Shirt 2016-10-05 20:41:16 -06:00
parent 583499f004
commit 436a0f996f
2 changed files with 32 additions and 6 deletions

View file

@ -10,17 +10,17 @@ class Game_Character
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :id # ID
attr_reader :x # map x-coordinate (logical)
attr_reader :y # map y-coordinate (logical)
attr_reader :real_x # map x-coordinate (real * 128)
attr_reader :real_y # map y-coordinate (real * 128)
attr_accessor :x # map x-coordinate (logical)
attr_accessor :y # map y-coordinate (logical)
attr_accessor :real_x # map x-coordinate (real * 128)
attr_accessor :real_y # map y-coordinate (real * 128)
attr_reader :tile_id # tile ID (invalid if 0)
attr_reader :character_name # character file name
attr_reader :character_hue # character hue
attr_reader :opacity # opacity level
attr_reader :blend_type # blending method
attr_reader :direction # direction
attr_reader :pattern # pattern
attr_accessor :direction # direction
attr_accessor :pattern # pattern
attr_reader :move_route_forcing # forced move route flag
attr_reader :through # through
attr_accessor :animation_id # animation ID

View file

@ -25,6 +25,32 @@ module Script
return 0
end
def self.niko_reflection_update
for event in $game_map.events.values
if event.name == "niko reflection"
event.real_y = 14*128 - ($game_player.real_y - 14*128)
event.real_x = $game_player.real_x
event.y = 14 - ($game_player.y - 14)
event.x = $game_player.x
if event.y > 13
event.y = 13
end
if event.real_y > 13*128
event.real_y = 13*128
end
event.direction = $game_player.direction
event.pattern = $game_player.pattern
case event.direction
when 2
event.direction = 8
when 8
event.direction = 2
end
return
end
end
end
# Temporary switch assignment
def self.tmp_s1=(val)
$game_switches[TMP_INDEX+0] = val