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"

Door not working

So I followed a youtube tutorial, multiple actually, and I made it exactly as they did, I attacted a screenshotscreenshot and whenever I try it, one door will open, but the next door opens/toggles the other door. What did I do wrong?

Product Version: UE 4.20
more ▼

asked Sep 14 '18 at 11:04 PM in Blueprint Scripting

avatar image

5 1 1 3

avatar image ThompsonN13 Sep 14 '18 at 11:20 PM

your calling the timeline from multiple locations which could cause an issue. your also moving a bed frame or at least thats how you have it labeled. your cast node isnt attached to anything. your picture doesnt show the whole picture so to speak and your explanation is lacking.

one door will open, but the next door opens/toggles the other door.

what is that meant to mean? you are also only showing moving one item here the bedframe. maybe your setting bedframe to a different value but you dont show it so i can only guess.

you also dont show your timeline curve which could be useful.

avatar image Pepperoni505 Sep 14 '18 at 11:30 PM

Hi, Here are some screenshots of the blueprintsalt text alt text alt text alt text

avatar image Pepperoni505 Sep 14 '18 at 11:31 PM

I unlinked the Flip A and B to find the problem, it just changes to the door, and also acts weird, by choosing random doors it fells like.

avatar image ThompsonN13 Sep 15 '18 at 02:25 AM

adding screenshots is good but you need to explain the issue your having. what are you looking to have happen? what is currently occurring? the basic script you have there will work depending on your timeline setup. theres a few things id change personally like defining you want the overlap of the character to change the variable, but overall things are ok looking (again depending on your timline and intent). if your timeline for the movement is set to something like 0-90 value for the rotation you should be good, you also shouldnt need the location aspect. another thing to consider is, is the door frame the root component of this actor? if it is then using relative rotation wont work right. one last thing to consider is how is the custom event being called? its not shown but im assuming your using a input key somewhere.

below is a basic example of how you could do a door. it checks to see if its the player overlapping and i use a lerp to control how much the door opens.

alt text

capture.png (281.4 kB)
avatar image Pepperoni505 Sep 15 '18 at 01:59 PM

Hi Thompson, thanks for your replies. The issue I'm having is that the "door" is more or less a murphy bed, and the location puts the Bed Frame, which is the root of all the other components into the door frame, which is not a child of Bed Frame. My issue is that say if I have 5 bed "doors" in the world placed. If I open the first one, it works fine, but the second one I open, basically opens the one I wanted to open, but closes the other one. It does the same thing the more "doors" I try opening. It also is the same issue with a camera I have, it is a child of Bed Frame, (i know i unlinked it, it was just so I could figure out the problem), and when ever I try with the camera, it goes to the first door I opened. The camera is at the position that looks like the player is sleeping. And the custom event is being called from the level blueprint, and that works fine. Now for my timeline, I have 4 values in there, They are X,Y,Z, Rotation. Rotation is on the X axis and is -90, X is 0, Y is - 370, Z is 390. I hope this is enough. Thanks

avatar image ThompsonN13 Sep 15 '18 at 02:33 PM

you may actually have an input issue. assuming that all your doors in your level are instances of the same actor then using one shouldnt affect the others. how are you calling the event to open the door/bed?

what im imagining is a bed in a doorframe that opens like a drawbridge, that should be super simple and is what ive shown in the last picture (i just noticed i screwed up in that picture btw i didnt add a flipflop after the branch and accidentally connected both true and false opps).

one thing you could try is if your using key input then to open the door then you could try setting enable input to false in the class defaults, then instead of using a bool to control can open door you could just use on begin overlap enable input and on end overlap disable input. it will accomplish the same thing but can eliminate a few other problems that may exist. you may also want to add some flow control after the overlap events so they only fire once every 0.5seconds or something, i say this because if you print out when overlaps happen you will see that many begin and ends happen rapidly when you walk into the volume.

avatar image Pepperoni505 Sep 15 '18 at 04:55 PM

I attached a screenshot of the input, it's in the Level Blueprint. Also, how would I go about adding flow control? alt text

capture.png (350.7 kB)
avatar image Przemek2222 Sep 15 '18 at 07:51 PM

Documentation say that doors can be done with matinee. I'm using doors as animation in matinee and it's perfect. And easy to do.


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

1 answer: sort voted first

So I fixed the problem. As ThompsonN13 said, I did have an input issue. Also, Thanks thompson for the time you put in to help me. The issue was my input was calling the open door sequence for the amount of actors I had placed, causing it to mess up. Thanks everyone that helped.

more ▼

answered Sep 16 '18 at 01:43 AM

avatar image

5 1 1 3

(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