# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/4-generate-the-board
# Local doc: epic-docs/documentation/en-us/fortnite/4-generate-the-board.md
# Section: Files
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Assets }
using { DataTypes }
using { UtilityFunctions }
board<public> := class(creative_device):
<# Fields #>
@editable
Bounds<public>:board_bounds = board_bounds{}
@editable
TileSize<public>:vector2 = vector2{}
@editable
PawnStaticMesh:?mesh = false
@editable
NumberOfPawns:int = 5
var<private> Pawns:[]creative_prop = array{}
<# Tile <--> World #>
# tile_coordinate within board_bounds
IsTileCoordinateOnBoard<public>(TileCoordinate:tile_coordinate)<decides><transacts>:void =
Bounds.LeftBounds.Low <= TileCoordinate.Left <= Bounds.LeftBounds.High
Bounds.ForwardBounds.Low <= TileCoordinate.Forward <= Bounds.ForwardBounds.High
# tile_coordinate -> vector3
ToVector3<public>(TileLocation:tile_coordinate)<decides><transacts>:vector3 =
IsTileCoordinateOnBoard[TileLocation]
BoardTransform:transform = GetTransform()
Verse Library
verse
06 Files
A creative device class that validates tile bounds and converts between tile grid coordinates and world space vectors.
extracted-snippets/documentation/en-us/fortnite/4-generate-the-board/06-files.verse
Sign in free to read the full source 🌴
This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.