COELOCANTH'S PROFILE

Search

Filter

Making a Compass/Pointer [RMMV]

You're using an event that follows the player around?
Make sure you set the movement behaviour on all the event pages, not just the first one.

Another way to do the compass would be using a show picture command (in an autorun event), and a move picture command in a parallel event to set the rotation of the compass picture, and keep it centered on the player if the map doesn't have borders.

[RMMV] [RM2K3] [NSFW] Destructible clothes/equipment

Break it down into sub systems.

1. Character graphics that change based on equipment
2. Item durability
3. Put 1 & 2 together so that sprites change on item breakage and not just when using the equip menu

That's all "dual use" stuff, you could as easily make a low fantasy game out of it with different choice of graphics.

OBSCURE NOT THREE THING RESPONSE COLLECTIVE

OBSCURE NOT THREE THING RESPONSE COLLECTIVE

My birthday is today. I am not celebrating alone. Congratulate me, please.

Happy solar orbital day

OBSCURE NOT THREE THING RESPONSE COLLECTIVE

OBSCURE NOT THREE THING RESPONSE COLLECTIVE

Collaborators

OBSCURE NOT THREE THING RESPONSE COLLECTIVE

Unconquered

(note: it rotates)

How to make enemies walk towards you when you get close?

I'd guess you can use a common event, if you're careful with variables.
You'd have to use a pointer variable set to the id of the switch to toggle when calling the common event.

Here's some cheats for measuring distances to avoid trigonometry.
I've written all these in pseudo code, but they can be implemented with 2k3 control variables & conditional branch commands.
1) skip the square root
dx = x1 - x2
dx = dx * dx
dy = y1 - y2
dy = dy * dy
d = dx + dy
normally you'd take a square root here, to get the distance.
But if you just want to test if the distance is less than a certain range, compare it with the square of the constant distance
if( d >= 9 ) # true if the distance is >= 3 tiles.

2) just add x and y distances
dx = x1 - x2
if( dx < 0 ) dx = -dx # or use the 'abs' function if available
dy = y1 - y2
if( dy < 0 ) dy = -dy
d = dx + dy

This gives a diamond shape hit detection, like movement in fire emblem type tactics games. The distance is the number of tile moves between the two positions for 4 directional movement.
So the loss of accuracy may be an advantage

3) use the greater of x and y distances
dx = x1 - x2
if( dx < 0 ) dx = -dx # or use the 'abs' function if available
dy = y1 - y2
if( dy < 0 ) dy = -dy
d = max(dx, dy)

This one gives a square detection area, again cheap and cheerful for tile based games where you don't need to be terribly accurate.

[RMVX ACE] I want to show stat parameters in shop

Along the same lines as Marrend, it's a little crowded so may be worth commenting out the actor name / item name as well if you like.

class Window_ShopStatus < Window_Base
  #--------------------------------------------------------------------------
  # * Number of Actors Displayable at Once (override)
  #--------------------------------------------------------------------------
  def page_size
    return 1
  end
  #--------------------------------------------------------------------------
  # * Draw Actor Equipment Information (override)
  #--------------------------------------------------------------------------
  def draw_actor_equip_info(x, y, actor)
    enabled = actor.equippable?(@item)
    change_color(normal_color, enabled)
    draw_text(x, y - line_height, 112, line_height, actor.name)
    item1 = current_equipped_item(actor, @item.etype_id)
    draw_actor_param_change(x, y, actor, item1) if enabled
    draw_item_name(item1, x, y + (8 * line_height), enabled)
  end
  #--------------------------------------------------------------------------
  # * Draw Actor Parameter Change (override)
  #--------------------------------------------------------------------------
  def draw_actor_param_change(x, y, actor, item1)
    8.times.each do |param_id|
      rect = Rect.new(x, y + (param_id * line_height),
                      contents.width - 4 - x, line_height)
      change = @item.params[param_id] - (item1 ? item1.params[param_id] : 0)
      change_color(normal_color)
      draw_text(rect, sprintf("%s", $data_system.terms.params[param_id]))
      change_color(param_change_color(change))
      draw_text(rect, sprintf("%+d", change), 2)
    end
  end
end