x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Blueprint - And?

Is there a blueprint that covers and? I'm trying two write a blueprint, and only want something to happen if two things are true. Using a branch with two items connecting to it's exec doesn't work, so I'm lost here.

alt text

I want something to happen when the actor overlaps with the trigger volume AND E is pressed (to use). How do I make this happen? I don't see anything for "and" in blueprints.

This current idea I have seems to function as an or, not an and. If overlap or e is pressed, it's true. Not if overlap and e is pressed.

Product Version: Not Selected
Tags:
capture.png (28.7 kB)
more ▼

asked Mar 30 '14 at 12:27 AM in Blueprint Scripting

avatar image

pivotraze
3 1 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

For this specific example of using AND I would suggest storing the overlapping state in a bool as a separate chain of events. Then when the key is pressed you check if this bool is true or not.

alt text

bp_and.png (83.5 kB)
more ▼

answered Mar 30 '14 at 12:38 AM

avatar image

Dieselhead
1.2k 27 22 211

avatar image pivotraze Mar 30 '14 at 12:47 AM

Only problem is I'm not sure how to use the SET box, or even what that is? I'm brand new to Unreal Engine 4 and BluePrint. I searched SET and found "Set Tags" which looks like it, but I don't see how to add Is Overlapping? Does it matter that mine is a Begin/EndOverlap (Trigger1)?

avatar image Zeustiak Mar 30 '14 at 12:54 AM

You need to create a new bool variable. You can name it Is Overlapping or whatever you want. Then you drop it into the blueprint and use Set.

You see how Event Actor Begin Overlap leads to the SET function for "Is Overlapping" variable. The check box = true so it is "Setting" the "Is Overlapping" variable to true. Then, you "Get" the "Is Overlapping" variable and you route it into your branch so that when you press E it will only fire if the branch shows true.

For more detailed walkthrough, I highly recommend the Blueprints video series created by epic. It discusses this same issue a few videos in: https://www.youtube.com/watch?v=cRhWc2kAhqI

avatar image pivotraze Mar 30 '14 at 12:51 AM

Nevermind! I just figured out that I can create new variables in BluePrint, and that it how you do it. Wow, this is a bit different than Kismet xD

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Try using a Gate for this (Flow Control>Gate). Send your input event into the Enter input. Send the trigger volume BeginOverlap into Open and an EndOverlap into close. Then the gate will only be open when you're inside the volume.

gatedinput.jpg (121.5 kB)
more ▼

answered Mar 30 '14 at 12:45 AM

avatar image pivotraze Mar 30 '14 at 12:52 AM

Thanks for the idea, but I ended up using Dieselhead's answer. Your's sounded like it would work as good though aha

avatar image Dieselhead Mar 30 '14 at 12:56 AM

I did not know about the Gate node myself and I'll certainly make use of it in the future, so thanks :)

avatar image rob.gray1 STAFF Mar 30 '14 at 01:01 AM

Nothing wrong at all with Dieselhead's solution. The Gate is basically just doing the same thing "under the hood". You'll find with the flexibility and power of Blueprints, there's often several ways you can do the same thing. :)

avatar image pivotraze Mar 30 '14 at 01:08 AM

It's great to know all the different ways one can do something, so I'm happy too! I'm nervous to get into C++ scripting. I write a ton of Python programs, but C++ has always been a bit overwhelming haha.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question