Use conditional schematics to enhance your HUDs!
Beside using schematics when opening or closing a HUD (e.g. fading them in/out), you can use conditional schematics while the HUD is displayed.
Conditional schematics check the HUD’s user/content and use a schematic when the conditions are valid or invalid. I.e. each time the outcome of the conditions change, either the valid or invalid schematic is used.
In this tutorial, we’ll use conditional schematics to slightly increase the scale of a combatant’s HUD in a Timebar HUD while the combatant selects actions and return it to the regular scale afterwards.
This tutorial is based on the 3D RPG Playground series, but you can use this for any kind of project (or HUD).
Scale Up #
We’ll start with the schematic to increase the scale.
Open the Makinom editor and navigate to Schematics.
Change UI Scale #
Add Node > UI > Change UI Scale
This node is used to set or fade the scale of UI elements (e.g. flying texts, UI boxes or HUDs).
We’ll fade the scale to 1.1 in a very short time.
- Vector3 Type (Scale Factor)
Select Value > Value. - Value (Scale Factor)
Set to X=1.1, Y=1.1, Z=1.1. - Fade
Enable this setting. - Time
Select Value > Value.
Set the value to 0.1. - Interpolation
Select Linear. - Data Key
Set to ui. - Data Origin
Select Local.
And that’s it for the schematic. Click on Save Schematic to save it, e.g. as UIScaleUp.
Scale Normal #
The same as for scale up, just returning to a scale of 1.
Change UI Scale #
Add Node > UI > Change UI Scale
We’ll fade the scale to 1 in a very short time.
- Vector3 Type (Scale Factor)
Select Value > Value. - Value (Scale Factor)
Set to X=1, Y=1, Z=1. - Fade
Enable this setting. - Time
Select Value > Value.
Set the value to 0.1. - Interpolation
Select Linear. - Data Key
Set to ui. - Data Origin
Select Local.
And that’s it for the schematic. Click on Save Schematic to save it, e.g. as UIScaleNormal.
HUD Setup #
With our schematics set up, we can use them on our HUDs. They can be used on any HUD you want, but for this tutorial we’ll use it in the Player Timebar Icon HUD, which is used by the timebar to display the player combatants.
Navigate to UI > HUDs and select the Player Timebar Icon HUD.
Schematics #
The HUD currently uses the default schematics for all HUDs (fading in/out), so we’ll need to set them up again due to using a custom setup now.
- Own Schematics
Enable this setting. - Before Open Schematic
Select the UIFadeIn schematic (or any other schematic you want). - Wait (Before Open Schematic)
Enable this setting. - Before Close Schematic
Select the UIFadeOut schematic (or any other schematic you want). - Wait (Before Close Schematic)
Enable this setting.
Now, we’ll add the conditional schematics. We’ll check if the HUD user, i.e. the combatant that it’s displayed for, is currently selecting actions.
Click on Add Conditional Schematic.
- Valid Schematic
Select the UIScaleUp schematic.
This’ll be used if the HUD’s user matches the conditions, i.e. is currently selecting actions. - Invalid Schematic
Select the UIScaleNormal schematic.
This’ll be used if the conditions failed, i.e. the user isn’t selecting actions.
Click on Add Condition to add the condition we’ll check for.
- Condition Type
Select Combatant Status. - Game Object
Select User.
This’ll use the HUD’s user and is the default setup (so not really something you need to set up).
Click on Add Status Condition to add the actual status condition we check’ll.
- Status Needed
Select Is Choosing.
This condition checks if the combatant is selecting actions. - Is Choosing
Enable this setting.
We check for the combatant currently selecting actions.
Save Changes #
And that’s it – click on Save Settings to save the changes.
Testing #
Hit play and test the new HUD effect.
Naturally, this’ll only be used during Active Time battles – if you don’t have that set up, you can also use this in a Turn Order or any other type of HUD (displaying a combatant, due to the used conditions).