Announcement

Collapse
No announcement yet.

Help with button please!!

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

    Help with button please!!

    Hi,
    This is my first time posting on this thread as I couldn't find the answers elsewhere. I also apologize if I posted this in the wrong place but after looking It's the best place I could find.

    Basically I have a trigger which plays a load of matinee's once I stand inside it and press 'E'. This is good, but the problem is I can only use it once and then it doesn't work again. I was wondering how I would go about doing that? I have tried linking the last play matinee into the open of the gate but it just creates a continuous loop which Unreal Engine doesn't like. I want the matinee's to play each time I press the 'E' key. This is how it looks:

    Click image for larger version

Name:	1.png
Views:	2
Size:	199.1 KB
ID:	1148723

    Thank you in advance!

    #2
    The matinee's created in the events above basically reveal a secret button, I'd also like it if when the secret button is pressed, it completely stops the first button from working, so help with that would also be very much appreciated. Here is what the secret button looks like

    Click image for larger version

Name:	2.png
Views:	1
Size:	128.0 KB
ID:	1075187

    So I'm not sure how I'd like it all together to get that working.

    Comment


      #3
      For the button not working, just make a Boolean 'ShouldButtonWork' and have a branch check to see if it is true, if so then let button execute. I am not sure about your first problem because I have no idea what a matinee is. But one thing, why are you casting to MatineeActor if you do not link anything to the 'As Matinee Actor' node? I'm guessing if you remove the cast, it will work every time.
      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


        #4
        I'm not sure what you mean or how to go about what you mentioned regarding the boolean. I've only been using the programme for a week so my understanding is quite poor. I apologize for that. Sadly removing the cast didn't fix the problem.

        Comment


          #5
          I'm not sure which code is for your button, but this is very simple. After you do the code for the secret button, make it so that it does this:

          Make a Boolean, which is a variable, and after the secret button it pressed, make it so that it sets 'ShouldButtonWork' to false. Now in your 1st button code, before it executes the 1st button's code, add a 'branch', and the condition node should be linked to the 'get ShouldButtonWork' return value. And then link the 'true' execute node of the branch to finish the code of the 1st button.

          Definitions:

          A Boolean is a variable that either holds true, or false.
          A Branch is a node that checks to see if something is true or false. It then executes either the true node, or the false node depending on the condition.

          Make sure that 'ShouldButtonWork' is set to true/is checked by default. Here is a picture example:

          Click image for larger version

Name:	a.png
Views:	1
Size:	260.6 KB
ID:	1075192
          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


            #6
            Thank you, I'll try that out in a bit but it looks good and I see no reason why It wouldn't work. I appreciate the help. Now I'm just hoping someone pops up with a reason as to why my first button only works once. But thanks again!

            Comment

            Working...
            X