Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Class Syntax (Element Rank) Help

I'm making a script that basically allows for the hero to learn a skill, assuming his class is A in Element X, and the skill is tagged with Element X.

What would be the if statement to check Class "Hero" to have "A" in Element X?

I already have this much:

if $data_skills[skill_id].element_set.include?(22)

But when I tried this:

if $data_classes[actor.class_id].element_ranks.include?(22:0)

It stops the game if it's not true. Help would be appreciated.

This doesn't seem to work either. I've read that A through E are assigned 1 to 6, but I guess this isn't the correct setup.

$data_classes[actor.class_id].element_rank[22] == 0
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top