RPG Maker Forums

I'm currently messing around with CSCA Dungeon Tools for RM Vx Ace just for fun. I've created moving enemies to hit with the Arrow Tool, but sometimes the Arrow simply passes through the enemies. I think that's because of the collision detection mentioned in the script. It seems to use Event coordinates.

Code:
def get_arrow_success_coords(event)
    x = event.x
    y = event.y
    d = event.direction
    case d
    when 2; y += ARROW_DIST
    when 4; x -= ARROW_DIST
    when 6; x += ARROW_DIST
    when 8; y -= ARROW_DIST
    end
    @csca_success_x = x
    @csca_success_y = y
  end

  def csca_finish_move_route
    @csca_dt_done_moving = true
  end
 
  def csca_arrow_finish
    csca_get_event
    if @csca_event.x == @csca_success_x && @csca_event.y == @csca_success_y
      csca_clear_event
    else
      csca_check_collision(@csca_event)
    end
  end

I tried to exchange event.x for screen.x and event.y for screen.y to use screen coordinates for the Arrow Event, but that doesn't work like I thought. How can I change that, so that the result is more accurate? Also, how can I set the bomb up to have a certain range (for example 4 fields)?

Greetings,
Tw0Face

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,036
Messages
1,018,461
Members
137,821
Latest member
Capterson
Top