Announcement

Collapse
No announcement yet.

Random Door Opener (Problem)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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

    Click image for larger version

Name:	matinee1.jpg
Views:	1
Size:	249.8 KB
ID:	1083950
    Click image for larger version

Name:	matinee2.jpg
Views:	1
Size:	228.3 KB
ID:	1083951
    Last edited by OximusPrime; 08-18-2015, 07:44 AM.

    Comment


      #3
      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.

      Comment


        #4
        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).

        Click image for larger version

Name:	randomInt.png
Views:	1
Size:	25.0 KB
ID:	1083986

        Comment


          #5
          Originally posted by LazyLoading View Post
          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).

          [ATTACH=CONFIG]53149[/ATTACH]
          Could also use a "Switch on Int". Then he would save himself all the equal and branch nodes.
          Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

          My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
          (Including 100+ Pages Multiplayer Network Compendium to get you started.)

          Comment


            #6
            Originally posted by eXi View Post
            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.
            Marketplace Assets

            Advanced Mobile Input: Marketplace Page | Support Thread ――― Easy Input Remapping: Marketplace Page | Support Thread
            Multiplayer Blueprint Chat System: Marketplace Page | Support Thread ――― Closing Credits System: Marketplace Page | Support Thread
            Minesweeper Template: Marketplace Page | Support Thread ――― Maze Creator: Marketplace Page | Support Thread

            Comment


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

              Comment

              Working...
              X