Hello,
I need to add support for a Subclass in my game and I'm having trouble figuring out how to display it (such as in a HUD).
I've seen some of the other posts
like this one but they don't go much into specifics. Currently I'm using a
custom component to track the combatant's subclass and save/load it.
I can store the Subclass data in a global variable, but I need to infer the key of the variable in the text field. For example, if I have a character Bob with a global variable with a key of "bob_subclass_name", how do I construct that in the text field? Can I use the % short hand (eg. #varstring%n_subclass_name#)?
Thanks for your help.
In the HUDs Status Element, in addition to the short hands (eg. %n for name), you can check the "Use Object Variables" box where the variable
#varstringsubclass_name#
is looked up on the object (the combatant) instead of global variables.When I want to change the combatant's Subclass I call a function that sets `subclass_name` on the combatant:
combatant.Variables.Set("subclass_name", "The name of the Subclass");
And it prints as expected in the HUD.
Thanks!
Class slots are set up in Combatants > Class Slots and are added to combatants (either all via general settings or individual combatants).
There's also UI support, with a Class Slot menu part, HUD components, etc.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
For changing the (sub)class in the UI I'm using a Menu Screen with a Button List. For the menu item I can specify a game event, but is there any way to pass a variable to the game event? I have a separate game event for setting every class and subclass even though they are all doing almost the exact same operation. It would be helpful if I could call a "changeClass" or "changeSubclass" game event and specify what the class is being changed to from the menu item.
Thanks for your help.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If there's ever an opportunity to migrate to ORK 3 I'll take it :)