Code: class Game_Event alias size_refresh refresh attr_reader :size def refresh size_refresh for i in 0...@list.size if @list[i].code == 108 if @list[i].parameters.to_s.upcase == "SIZE" @size[0] = @list[i+1].parameters.to_s.to_i @size[1] = @list[i+2].parameters.to_s.to_i end end end end end class Game_Character alias size_initialize initialize def initialize @size = [] size_initialize end def screen_x if @size[0].nil? or @size[0] % 2 == 1 return (@real_x - $game_map.display_x + 3) / 4 + 16 else return ((@real_x - $game_map.display_x + 3) / 4 + 16) - @size[0] * 8 end end def passable?(x, y, d) if @size[0].nil? return size_passable(x,y,d) else for i in -(@size[0] / 2)..@size[0] / 2 + @size[0] % 2 - 1 for c in -(@size[1])+1..0 return false unless size_passable(x+i,y+c,d) end end return true end end def size_passable(x,y,d) new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0) new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0) unless $game_map.valid?(new_x, new_y) return false end if @through return true end unless $game_map.passable?(x, y, d, self) return false end unless $game_map.passable?(new_x, new_y, 10 - d) return false end for event in $game_map.events.values next if event == self if event.size[0].nil? h = hit(event,new_x,new_y) return h if h == false else for i in -(event.size[0] / 2) - event.size[0] % 2 + 1..event.size[0] / 2 for c in -event.size[1]+1..0 h = hit(event,new_x+i,new_y-c) return h if h == false end end end end if $game_player.x == new_x and $game_player.y == new_y unless $game_player.through if @character_name != "" return false end end end return true end def hit(event,new_x,new_y) if event.x == new_x and event.y == new_y unless event.through if self != $game_player return false end if event.character_name != "" return false end end end return true end end über main einfügen und beim event ein kommentar einfügen Code: size 2 1 in diesem fall wäre das event 2 felder breit und 1 feld hoch. bitte immer beide größenangaben machen und nicht nur die breite angeben! das ganze muss natürlich nur bei events eingefügt werden, die eine sonder größe haben. falls es irgendwie probleme damit geben sollte oder was nicht ganz so ist wie erwünscht einfach sagen
class Game_Event alias size_refresh refresh attr_reader :size def refresh size_refresh for i in 0...@list.size if @list[i].code == 108 if @list[i].parameters.to_s.upcase == "SIZE" @size[0] = @list[i+1].parameters.to_s.to_i @size[1] = @list[i+2].parameters.to_s.to_i end end end end end class Game_Character alias size_initialize initialize def initialize @size = [] size_initialize end def screen_x if @size[0].nil? or @size[0] % 2 == 1 return (@real_x - $game_map.display_x + 3) / 4 + 16 else return ((@real_x - $game_map.display_x + 3) / 4 + 16) - @size[0] * 8 end end def passable?(x, y, d) if @size[0].nil? return size_passable(x,y,d) else for i in -(@size[0] / 2)..@size[0] / 2 + @size[0] % 2 - 1 for c in -(@size[1])+1..0 return false unless size_passable(x+i,y+c,d) end end return true end end def size_passable(x,y,d) new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0) new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0) unless $game_map.valid?(new_x, new_y) return false end if @through return true end unless $game_map.passable?(x, y, d, self) return false end unless $game_map.passable?(new_x, new_y, 10 - d) return false end for event in $game_map.events.values next if event == self if event.size[0].nil? h = hit(event,new_x,new_y) return h if h == false else for i in -(event.size[0] / 2) - event.size[0] % 2 + 1..event.size[0] / 2 for c in -event.size[1]+1..0 h = hit(event,new_x+i,new_y-c) return h if h == false end end end end if $game_player.x == new_x and $game_player.y == new_y unless $game_player.through if @character_name != "" return false end end end return true end def hit(event,new_x,new_y) if event.x == new_x and event.y == new_y unless event.through if self != $game_player return false end if event.character_name != "" return false end end end return true end end
size 2 1
--Es ist ein magisches Liopleurodon =D
Foren-Regeln