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"

How to turn off a light completely by pressing a key, only while being inside a collision volume near it ?

Hi. I am working on a survival game, in which my character can turn off a light completely by pressing a key, only while being inside a collision volume near it.

I have made a blueprint. What I'm trying to do is to toggle visibility, as long as both boolean variables are true.

So... my character goes and enters volume. "Is globe overlapped" variable is set to true. The branch node sees in condition that only one variable is set to true, so it shouldn't fire. If I press the F key, the second boolean variable, "Is globe taken" is also set to true, so the branch sees that both are set to true so it fires. This is the logic I tought it would work, but it is not working. When I enter the volume, the light toggles on or off. Pressing F key does nothing. alt text

alt text

Product Version: UE 4.10
Tags:
more ▼

asked Feb 04 '16 at 04:14 PM in Blueprint Scripting

avatar image

mahri726
51 3 10 13

avatar image FilipeTessaro Feb 04 '16 at 04:19 PM

in the event: ActorBeginOverlaping, drag from the "otherActor" and "Castto yourcharacter" it will specify the actor that is triggering the trigger box, try if it makes the BP works and let us know.

But, why no use a flipflop node?

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

1 answer: sort voted first

Hopefully, paultech on unrealengine irc chat gave me the answer. I'll post it here for reference and for others who might have the same problem. alt text alt text

He said that overlap might have been tiny (the collision on the static mesh). He created a separate sphere collision.

more ▼

answered Feb 04 '16 at 05:04 PM

avatar image

mahri726
51 3 10 13

(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