RPG Maker Forums

Hey, everyone. I've been trying to fix my visible encounters system in VX Ace and gotten this code:

class Game_Player # --------------------------------------------------------------------------- # Overwrite check event trigger there # --------------------------------------------------------------------------- def check_event_trigger_there(triggers) x2 = $game_map.round_x_with_direction(@x, @direction) y2 = $game_map.round_y_with_direction(@y, @direction) @ignore_char = true start_map_event(x2, y2, triggers, true) if passable?(x,y,@direction) @ignore_char = false return if $game_map.any_event_starting? return unless $game_map.counter?(x2, y2) x3 = $game_map.round_x_with_direction(x2, @direction) y3 = $game_map.round_y_with_direction(y2, @direction) start_map_event(x3, y3, triggers, true) end alias theo_evtrigger_collide_chars? collide_with_characters? def collide_with_characters?(x ,y) return false if @ignore_char theo_evtrigger_collide_chars?(x,y) end endBasically, what this does is to stop a player from accessing an event through tiles that are impassable, so that if, for example, a treasure chest is at the top of a cliff and the player can walk on a lower area to get to the tile to the left of it, that treasure chest cannot be opened.

On the other hand, when an event triggered by Event Touch tries to approach the player, it ignores this check and can activate regardless. Since I'm using a visible encounters system and make heavy use of multi-layered paths on my maps, it's a major problem when enemies can attack players from other levels of the area. Keep in mind that none of the events involved have Through enabled--where they are allowed to walk is limited as normal. I found this bug in my game and recreated it in a completely new project using the same script as above.

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,546
Members
137,835
Latest member
yetisteven
Top