The miniboard shows a player a view of their own board. Hit markers indicate that a board tile has been attacked and the enemy successfully destroyed a pawn at that tile. Miss markers indicate that a board tile has been attacked and the enemy did not hit anything.
The miniboard itself is a static mesh placed with respect to the gameplay camera so it appears as part of the game user interface. To place the miniboard, a few things must be known:
The gameplay camera transform.
How far to offset the miniboard from the camera.
The board grid size.
The static mesh to use for the miniboard.
The camera transform can be accessed from the gameplay camera, so add a reference to the gameplay camera. The second can be done by trial and error through UEFN, so it can be an editable vector. The third can be accessed through a reference to the player's game board. The last can be stored through a reference to the asset generated through the Verse Assets.digest.verse.
The miniboard was created in UEFN Modeling mode to model a simple static mesh. It is named SM_Miniboard.
The gameplay camera is a fixed point camera looking down toward the game board.
Structure the Miniboard Class
To define the miniboard class, create a new Verse file named miniboard.verse and add a new Verse device named miniboard.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Assets }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { DataTypes }
miniboard<public> := class(creative_device):Add the variables previously discussed to the class:
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Assets }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { DataTypes }
miniboard<public> := class(creative_device):
@editable
Place the Miniboard
To place the miniboard, construct a new function called Position. This function needs no information other than the transform of the CameraDevice, StaticMesh, and BoardOffsetFromCameraDevice.
The position function places the miniboard with respect to the gameplay camera to make it appear as if it is part of the game user interface.
This function performs the following steps:
Obtains the transform of the gameplay camera.
Predefines a rotation correction for the miniboard mesh.
The miniboard mesh is oriented so that it faces toward the Up or Z axis.
This rotation rotates the mesh so it faces toward the Forward or X axis.
Constructs the miniboard transform.
The translation of the miniboard starts at the camera, then adds the offset from the camera device, rotated to face the camera.
The rotation is made to face the camera and correct for the primary axis of the miniboard.
The miniboard prop is spawned and the static mesh is set.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Assets }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { DataTypes }
miniboard<public> := class(creative_device):
...
To place the miniboard once play begins, override the miniboard OnBegin function:
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Assets }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { DataTypes }
miniboard<public> := class(creative_device):
...
Summary
To summarize, this page has taken you through the following steps:
Define a representation of a tile in miniboard space.
Define the limits of miniboard space.
Define where miniboard space is located in world space.
Files
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Assets }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { DataTypes }
miniboard<public> := class(creative_device):
@editable