[RESOLVED] Displaying evasion parameter

Started by Wingard, June 05, 2013, 03:01:59 pm

Previous topic - Next topic

Wingard

June 05, 2013, 03:01:59 pm Last Edit: June 06, 2013, 04:13:25 am by Wingard
Hey, quick question from a nooby "scripter" here  :D

Is there a way to display actor's evasion parameter?

I tried to modify "Draw Parameter" section in Window_Base by adding:
  when 7
     parameter_name = $data_system.words.eva
     parameter_value = actor.eva
     self.contents.draw_text(x + 10, y, 120, 32, parameter_name)
     self.contents.draw_text(x + 45, y, 36, 32, parameter_value.to_s, 2)

... but when im trying to make script display it by the draw_actor_parameter command it doesnt work. :/ This only results in the game crash with a message which says that the first line is wrong (the one below "when 7") and this:

undefined method 'eva' for #<RPG::System::Words:0x3335778>

I dont really know how to "define method 'eva'" or where to do it. Could someone help me with this? :plz:

G_G

That's because "eva" doesn't exist as a system word. You'll just have to implement your own word.
parameter_name = "EVA"

Wingard

And now it works!  :D   Thank you so much.  :)

G_G

And if you really wanted to use "$data_system.words.eva" You could define it yourself. Just for future references. :)

class RPG::System::Words
  alias init_system_words_later initialize
  def initialize
    init_system_words_later
    @eva = "EVA"
  end
end