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"

Overlapping actors with box collision inhibits each other

Hey! I've had some problems creating a light switch system in UE4. The first blueprint I made didn't fire correctly when duplicated in the content browser (as a way of being able to customize different blueprints independently), because even child blueprints didn't work out. So I came up with the idea to create two blueprints, one for signaling and one for the visuals.

They both have a box collision in the exact same size and position. One of them has a light switch asset, and it's only purpose is to control the state of that asset when interacted with. No blueprint communication at all. The other blueprint is casted to from a light source, to check if it's state is on or off. This way I can just place them them together in the editor, and the player interacts with them simultaniously when they enter the box collision and input is enabled for both blueprints. Problem is, it won't work when they actually overlap in the editor. I don't know why this would happen. I have tried moving them apart, and then the system works just fine. But when they are at the same location, the player input event actually never fires for the actor that controls the state of the light.

If anything is unclear, just ask. But long story short, two actors placed on top of each other in the editor inhibits each other from working properly, and I have no idea how to fix it.

Product Version: UE 4.18
more ▼

asked Mar 05 '18 at 08:56 PM in Blueprint Scripting

avatar image

30 5 5 9

avatar image Nebula Games Inc Mar 05 '18 at 09:24 PM

Do you have screen shots of your set-up? Also, I am confused what exactly you're trying to do in general. Are you trying to turn a light on and off with an overlap event? What is the basic logic here?

avatar image CorbisHETB Mar 05 '18 at 09:41 PM

Should probably specify, but won't be able to post any screenshots until tomorrow. I have a blueprint containing a light source. I have another blueprint that switches a bool value with a flip flop. I use a box collision to enable input, and then use an event to switch the value. It's a simple press on a keyboard. The blueprint containing the light constantly casts to the switch blueprint, and turns the light off if the bool is false. The setup I created works without a problem. Then I tried to duplicate the switch blueprint, to be able to have two of them with different styles, but still the same function. But this didn't work, the duplicate always failed the cast.

So I thought it would be a good idea to use the same switch blueprint for all switches, and then add another blueprint on the same location, with the design I wanted. For example, I have a blueprint with a basic light switch asset that glows when the player is close to let the player know it is interactable.

Did that help? I might even post a video tomorrow if it's hard to understand. I'll probably not reply in a while either, it's pretty late.

avatar image Nebula Games Inc Mar 05 '18 at 09:51 PM

Kind of, but it seems like an overly complicated system to do something as basic as turning a light on or off, having something glow when the player is near, having different color lights (not sure what you mean by designs on lights) but either way, the general idea doesn't seem complicated. Not sure why you need a "constant" cast assuming you mean a "tick" by this, for something that you also use an overlap event for. Overlap events to trigger something seems much more efficient if the goal is to light something up or flash something when a player is near as opposed to checking a boolean value on tick...but screen shots will def help, a video is good too, just so I can understand what you're trying to accomplish.

avatar image CorbisHETB Mar 06 '18 at 06:14 PM

Alright, I have thought about it a bit, and found a new way to go around it. But just to explain, it's not just to turn a light on or off. I'm building a semi complicated system to simulate electricity. The problem wasn't really the system. The problem was a small problem (a bug maybe?) I encountered, and I needed some help to work around that. But I found a different way. The main problem was that blueprint actors placed on top of each other in the level would inhibit each other from working. Why, I don't know. But still, thanks for your support anyways!

avatar image Nebula Games Inc Mar 06 '18 at 10:08 PM

No problem! Good luck.

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

0 answers: sort voted first
Be the first one to answer this question
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