RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Actor.class_ID? ... howto show an actors class name

0 Members and 1 Guest are viewing this topic.

*
Rep: +0/-0Level 84
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:

Code: [Select]
    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!  ;)

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, you're most of the way there. To get the name of a class, you need:
 
Code: [Select]
$data_classes[class_id].name

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

*
Rep: +0/-0Level 84
Thanks! I've made it work  :D