Main Menu
  • Welcome to The RPG Maker Resource Kit.

Actor.class_ID? ... howto show an actors class name

Started by staticlove, February 20, 2009, 04:24:03 AM

0 Members and 1 Guest are viewing this topic.

staticlove

Hi everybody  ;8

I could use some help with scripting.

I'm trying to make an actors class name be written in a menu, but I only seem to be able to find how to write down the class_id.

The script goes something like this:

    self.contents.draw_text(--, --, --, --, "Class: #{@actor.class_id}")

In game it now shows the text: "Class: 09", so at least I got it working that far.

I've looked through the help file and I think I can call the class's name with the class.name command. I just don't understand how exactly.

I've tried lots of things like actor.class.name... which gives nothing. I'm new to using the script, but I want to learn. I'm sure one of you could give me some help!

Thanks in advance!  ;)

modern algebra

Well, you're most of the way there. To get the name of a class, you need:


$data_classes[class_id].name


So put what you have now in for the class ID and go nuts.