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.

call a common event?

so, I have a quick question. How do you check the actors class with a script. I'm just trying to use it in a conditional branch for something I working on. I've tried a couple of things based around this:

Code:
$game_actor_class_id = 'swordsman'

but that didn't seem to work. It should be something along these lines, right?


New question: How do you call a common event with a script?
 
if $game_actors[actor_id].class_id == x

where "actor_id" is the number of the actor, and "x" is the number of the class (both from the database)

or

if $game_party.actors[actor_id].class_id == x

where actor_id is the number of the actor in the party
 
Thanks for this! It worked out!

~xgamexfreakx

EDIT: okay, so that worked, now I have one more question. How do you call a common event in a script? I'm pretty sure its simple though...thanks!
 

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