Announcement

Collapse
No announcement yet.

Setting a var to true in lvl blueprint not working

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

    Setting a var to true in lvl blueprint not working

    So when I touch a trigger it sets a var in my gamemode to true (Yes, I have the vars as public). After this, it runs a function in the lvl blueprint that is this var is true, it will send me to a position. If it's false, it will send me to another. However somehow the var is not changing to true.

    All this nodes are in the lvl blueprint

    Trigger node :

    Click image for larger version

Name:	blueprint1.jpg
Views:	2
Size:	109.6 KB
ID:	1162302

    Click image for larger version

Name:	blueprints2.jpg
Views:	2
Size:	105.7 KB
ID:	1162303
    If you want to see my UDK games, have a look at my website!

    #2
    Does the overlap actually trigger? Did you try debugging that part of your BP?
    Join us on IRC! We are on #unrealengine @ freenode.org

    Comment


      #3
      Originally posted by Bajee View Post
      Does the overlap actually trigger? Did you try debugging that part of your BP?
      Yeah, be sure to check your overlap. You also need to be sure that your current game mode is InanimateMode, else your cast will always fail.
      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
        Putting a break point on the blueprints definitely helps to figure out whats going wrong, or at least some print strings.

        Comment


          #5
          I think this might be the same issue I've encountered twice before and managed to come up with this solution.

          Firstly you want to create a new Function within your Level Blueprint and give it an appropriate name. You will then need to create a reference to the blueprint from your level, drag off the pin and get the variable you are trying to use.

          On your Return Node you should click it and add an output that is the same variable type as the one you are getting. Then connect the variable pin from your blueprint into the condition of the return node.



          Then it is simply a case of going back to the Event Graph of your level blueprint and calling the function you've just created with the condition (variable) which you can now use.



          Hope this helps and let me know if you're still stuck.

          Comment

          Working...
          X