RPG Maker Forums

Hello;

I'm using a modified version of Yanfly Engine Ace - Ace Status Menu v1.02, in which i'm trying to change the properties section which display hit rate and other data for one that displays variable numbers on a character by character basis. The section i'm modifying looks like this at the moment (I cut out all the redundant copies, because i just want to get the base script functioning before i paste it a bunch of times.)

  def draw_property(property, dx, dy, dw)

    fmt = "%1.2f%%"

    case property[0]

    #---

    when :hit

      if @actor=$data_actors[1]

         value = $game_variables[1]

       else value = $game_variables[21]

         end

    #---

    else; return dy

    end

    colour = Color.new(0, 0, 0, translucent_alpha/2)

    rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)

    contents.fill_rect(rect, colour)

    change_color(system_color)

    draw_text(dx+4, dy, dw-8, line_height, property[1], 0)

    change_color(normal_color)

    draw_text(dx+4, dy, dw-8, line_height, value, 2)

    return dy + line_height

  end

 

The script runs without error, but it shows all characters as meeting the criteria for displaying variable 1. How do i make a script differentiate between actor IDs?

  

 

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