Announcement

Collapse
No announcement yet.

Boolean works in level BP but not other BP

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

    Boolean works in level BP but not other BP

    I have a boolean setup to know when I throw an object onto the floor. In the level BP I call that Boolean and drag the BP it was created from the world outliner into the level BP and it plays the matinee without any issues when the mag falls to the ground.
    Click image for larger version

Name:	boolwork.JPG
Views:	46
Size:	76.7 KB
ID:	1395005

    I also wanted to use this Boolean so I could get another BP to work when I dropped the mag but as you know you can't drag another BP from the world outliner into another BP so I created a reference variable to that BP so I could hook up the boolean but it doesn't work for some reason.
    Click image for larger version

Name:	boolnotwork.JPG
Views:	40
Size:	184.8 KB
ID:	1395006

    #2
    Well one mistake I made was running it off an event begin play when it should have been a tick. I was sure it would work then but still no.

    Comment


      #3
      OK hopefully this will explain what I'm trying to do better. I have created a BP called test quit and set a boolean to a key press.
      Click image for larger version

Name:	01.JPG
Views:	37
Size:	73.8 KB
ID:	1395036
      I then open up the level BP and running off a tick set up a branch that when set to true quits the game. The true statement is the Boolean I set in the test quit BP but because I didn't create the Boolean in the level BP when I call it it requires a target so I drag a reference of the test quit bp from the game level into the level BP and attach it to the target and it works. When I press the key the game quits.
      Click image for larger version

Name:	02.JPG
Views:	40
Size:	52.8 KB
ID:	1395037

      I then create another BP to do the same thing the level bp does but because I can't drag the test quit BP from the game world I create a variable that references the test quit BP and you would think it would do the same thing as the level BP but it doesn't. Does anyone know why?
      Click image for larger version

Name:	03.JPG
Views:	36
Size:	188.5 KB
ID:	1395038

      Comment


        #4
        The reason it doesnt work is because the TestQuit reference has not been set. TestQuit can point to ANY TestQuit instance. You might have multiple "TestQuit" instances in the level. You need to choose one and wire it to the variable. Select your TestBool instance in the level, and in it;s properties tab, set the TestQuit reference to the TestQuit instance you want. instance.

        To help, perhaps name it TestQuitRef. This will help distinguish it from the TestQuit class. And the instances in the level are often named TestQuit0, TestQuit1, TestQuit2....
        https://www.casualdistractiongames.com

        Comment


          #5
          Originally posted by OptimisticMonkey View Post
          The reason it doesnt work is because the TestQuit reference has not been set. TestQuit can point to ANY TestQuit instance. You might have multiple "TestQuit" instances in the level. You need to choose one and wire it to the variable. Select your TestBool instance in the level, and in it;s properties tab, set the TestQuit reference to the TestQuit instance you want. instance.

          To help, perhaps name it TestQuitRef. This will help distinguish it from the TestQuit class. And the instances in the level are often named TestQuit0, TestQuit1, TestQuit2....
          How does that work with a regular BP though? You can only drag BP's from the level into a level BP. I'm not trying to use a level BP to do this. The test quit reference is in a BP I created or did I pick you up wrong althogether? What do you mean by set the TestQuit reference?
          Last edited by tcla75; 12-05-2017, 10:13 AM.

          Comment

          Working...
          X