RPG Maker Forums

Hello, I had found Shaz's large collision script she had written for another member some time ago, but for the life of me, I can't get it to work. I even opened a new project and tried.

class Game_Event < Game_Character
alias shaz_large_event_collision_clear_page_settings clear_page_settings
alias shaz_large_event_collision_setup_page_settings setup_page_settings

def clear_page_settings
shaz_large_event_collision_clear_page_settings
@collide_width = 0
@collide_height = 0
end

def setup_page_settings
shaz_large_event_collision_setup_page_settings
@collide_width = 0
@collide_height = 0
list_index = 0
while list_index < @list.size && [108,408].include?(@list[list_index].code)
colx, coly = @list[list_index].parameters[0].scan(/<collision: (\d+),(\d+)>/i)[0]
@collide_width = colx.nil? ? 0 : (colx.to_i / 64)
@collide_height = coly.nil? ? 0 : (coly.to_i / 32 - 1)
list_index = @list.size if @collide_width != 32 || @collide_height != 32
list_index += 1
end
end

def pos?(x,y)
x.between?(@x - @collide_width, @x + @collide_width) &&
y.between?(@y - @collide_height, @y)
end
end

Its tiny here is the link.


Thanks for your help!

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,547
Members
137,835
Latest member
yetisteven
Top