Skip to main content
Version: 3.7

Procedural DungeonDungeon Generator Base ⏵ Get Random Room Candidate

Get Random Room Candidate

Class: Dungeon Generator Base
Category: Dungeon Graph

Description

Returns a random RoomCandidate from the array provided
When the scores are used as weights, zero and negative scores are discarded automatically

Node

C++

const FRoomCandidate& GetRandomRoomCandidate(const TArray<FRoomCandidate>& RoomCandidates, bool bUseScoresAsWeights) const

Inputs

NameTypeDescription
TargetDungeon Generator Base Object Reference
Room CandidatesArray of Room Candidate Structures
Use Scores as WeightsBoolean

Outputs

NameTypeDescription
Return ValueRoom Candidate Structure (by ref)Returns a random RoomCandidate from the array provided
When the scores are used as weights, zero and negative scores are discarded automatically