Skip to main content

Procedural DungeonDungeon Generator ⏵ Get Random Room Data Weighted

Get Random Room Data Weighted

Category: Dungeon Generator

Description

Return a random RoomData from the weighted map provided.
For example: you have RoomA with weight 1 and RoomB with weight 2,
then RoomA has proba of 1/3 and RoomB 2/3 to be returned.

Node

C++

URoomData* GetRandomRoomDataWeighted(const TMap<URoomData*,int32>& RoomDataWeightedMap)

Inputs

NameTypeDescription
InExec
TargetDungeon Generator Object Reference
Room Data Weighted MapMap of Room Data Object References to Integers

Outputs

NameTypeDescription
OutExec
Return ValueRoom Data Object ReferenceReturn a random RoomData from the weighted map provided.
For example: you have RoomA with weight 1 and RoomB with weight 2,
then RoomA has proba of 1/3 and RoomB 2/3 to be returned.