Game logic - Custom HUD – Ylands
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
=Overview= | |||
[[Ylands Custom UI - Edit layout|Edit layout]] | '''Custom HUD''' game logic provides a way of displaying additional custom information on the screen of the player, such as healthbars, timers, custom minimaps etc. It is possible to create and activate multiple overlaying Custom HUD layouts. | ||
This game logic shares a layout editor with '''Custom Window''' game logic and the details on how to operate can be found on it's own separate page: | |||
*'''[[Ylands Custom UI - Edit layout|Edit layout]]''' | |||
=Activating the Custom HUD= | |||
Custom HUD can be activated by default by checking the '''Visible to new players''' box in the properties window and it can be activated or deactivated via the visual scripting using the '''Show Custom Hud''' tile. | |||
=Scripting Custom HUD= | |||
==Principles== | |||
The layout of Custom HUD consists of '''Widgets''' and it is through modification of their properties the scripting works. | |||
You can view the list of related scripting tiles by switching to '''Advanced''' directory and then navigating to '''Game Logic - Custom UI''' or by searching the keyword '''Widget''' in the search bar. | |||
[image Advanced switch] | |||
==Optimization== | |||
While it might be tempting to update the widgets using the '''Time Trigger''', it is much more efficient to utilize other Game Logics, such as '''Zone trigger''' or '''Event trigger''' when possible. | |||
==Example== | |||
An example scenario [[Ylands_Tutorial_-_User_interface|User Interface]] exists in the game, which can be found in '''Editor - Create game - Examples menu'''. | |||
---- | ---- | ||
{{Navbox/Ylands}} | {{Navbox/Ylands}} |
Revision as of 13:55, 6 May 2021
Overview
Custom HUD game logic provides a way of displaying additional custom information on the screen of the player, such as healthbars, timers, custom minimaps etc. It is possible to create and activate multiple overlaying Custom HUD layouts. This game logic shares a layout editor with Custom Window game logic and the details on how to operate can be found on it's own separate page:
Activating the Custom HUD
Custom HUD can be activated by default by checking the Visible to new players box in the properties window and it can be activated or deactivated via the visual scripting using the Show Custom Hud tile.
Scripting Custom HUD
Principles
The layout of Custom HUD consists of Widgets and it is through modification of their properties the scripting works. You can view the list of related scripting tiles by switching to Advanced directory and then navigating to Game Logic - Custom UI or by searching the keyword Widget in the search bar. [image Advanced switch]
Optimization
While it might be tempting to update the widgets using the Time Trigger, it is much more efficient to utilize other Game Logics, such as Zone trigger or Event trigger when possible.
Example
An example scenario User Interface exists in the game, which can be found in Editor - Create game - Examples menu.