- Joined
- Dec 18, 2013
- Messages
- 7
- Reaction score
- 0
- First Language
- English
- Primarily Uses
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?
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?

