Download

Randomly selecting multiple objects.

Hello,
I’m a beginner to Unreal Engine 4 and unfortunately have been unable to find help/solve this myself. In my game, each round of enemies the player can go up to certain triggers that grants the player extra currency. There are 5 of these triggers around the small map in my game but I only want 3 of them to work/be active. On each round beginning I want the game to randomly select 3 of the 5 of these triggers to be activated. Making the other 2 switched off. So my question in essence, is how do i select 3 objects from a group/list of 5 objects at random.
I thought of making some boolean that controls whether these triggers are active or not, but other than that I can’t offer much help.

Thanks in advance.

Have a trigger manager which sits in the level. On begin play, it does a get actors on the triggers, shuflles it, and enables only the first 3 :slight_smile:

( quote me if you get stuck )