Download

Random Door Opener (Problem)

I’m trying to make a trigger activated event. Once the player activates the trigger it will randomly play one of two matinee’s which will be either door 1 opening or door 2 opening. I’ve searched for tutorials on how to set up random events to no avail. Does anyone know how to do this in Blue Prints or know of any tutorials which would answer this?

Array of public pickable matinee actor in your blueprint and in your trigger event random int in range 0 > (array lenght - 1) —> get array(random int) → play matinee

1f6ea4f4d318696f58c0e027a93755d8ad138a5a.jpeg

This is a bit to complex for what I’m after. I know how to do it with UDK 3 but there doesn’t seem to have any of the random features in UDK 4. I’m just after a Random Integer that will randomly roll a number 0,1 or 2 and if its 0 no doors open, if its 1 door one opens and if its 2 door 2 opens. I’m not sure if this features just hasn’t been added to the game engine yet.

This creates a random int between 0 and 2. Set some Equal nodes to find out if 0, 1, or 2 and open the door(s).

randomInt.png

Could also use a “Switch on Int”. Then he would save himself all the equal and branch nodes.

Yes, a “Switch on Int” node is sort essentially a branch that can have multiple outputs, an example is that if int =1, it outputs through execution pin 1, and so on.

Thank you all for the help. The combination of all of your advice lead to a working random door opener. :slight_smile: