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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to open and close multiple doors in a random sequence

Hi all, I am working on a personal project that has a room will multiple doors. Behind each door is a monster. I want to open one of the doors randomly to reveal an enemy, and then have that same door close after a delay. I am having some trouble with the closing part, and was wondering if I could get some suggestions. I have attached my current Blueprint for this project. Thanks!

alt text

Product Version: UE 4.17
Tags:
more ▼

asked Mar 16 '18 at 03:07 AM in Blueprint Scripting

avatar image

BJCobb
3 1 4

avatar image Nebula Games Inc Mar 16 '18 at 03:39 AM

What is the issue at the moment? What is wrong with the functioning? Besides not having "On Actor Begin Overlap" checking for any particular actor (player?) I don't see an issue with the logic. That delay should be as long as the entire "Matinee" though, 0.2 seconds is pretty short unless that's how fast you want the door to open and close...but that's like an instant to a human eye.

avatar image BJCobb Mar 16 '18 at 03:43 AM

So the issue I am having is that when it is time to draw the reverse function it picks a random door in the array and not the door that is already open. The delay value was just a temporary test value.

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

-1 answers: sort voted first

Ahh makes sense, I see now why that is. When you first pull off the "Get" you need to store that matinee actor as a variable and use the variable as the input to the "Play" and "Reverse" otherwise it basically thinks each time it should pull a "random" matinee index, that is what the code currently says. Read each node individually, the "Play" wire flows back from target to the Get node and asks for a "random" matinee, it plays that one, then has a delay, then goes to "Reverse" node, which also draws back from the target to the Get node and asks for the same thing "give me a random index" and it plays that one in reverse. The computer doesn't understand the "logic" behind play and reverse as a human would. So you need to store the first matinee as a variable and never draw back to the Get node again in the same execution chain.

more ▼

answered Mar 16 '18 at 03:50 AM

avatar image

Nebula Games Inc
5.4k 28 9 14

avatar image BJCobb Mar 16 '18 at 04:32 AM

Sadly I am still very new to Blueprints and I am not sure how to do this. any pointers to a tutorial on this would be appreciated.

avatar image BJCobb Mar 16 '18 at 05:02 AM

Never mind I got it working. Don't exactly remember what node I used for the set, but it worls perfectly now. Thank you for the pointers.

alt text

avatar image Nebula Games Inc Mar 16 '18 at 05:27 AM

I don't know a specific tutorial for this but I just made one for you. I will post the link when it is done uploading.......or you can figure it out yourself haha But yea that's what I was gonna show you.

https://youtu.be/LUF5DUqWYgM

(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