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"

Shooting a button to open a door?

I'm working on a small project based off of the default FPS template. Been trying to figure out how to make a door trigger once the projectile fired hits a button. I currently have the door opening via the player walking into a trigger box similar to the one in this tutorial: https://www.youtube.com/watch?v=mW4h0FbtVKs

I've seen other posts detailing how to do this but I'm still relatively new and am still unsure how to exactly go about this. This is what was suggested "If you have the door open/close blueprint all setup (make it a function you can call), then setting it up wont be hard. I would go about it by setting up a trigger box in front of the button in the level. Then in your level Blueprint, create a event on collision with the trigger box and cast it to your projectile or whatever it is you are using to trigger the door. Set that event to call the function to open your door from your door bp."

I have tried doing so with no luck. If anyone could help further maybe even show screenshots of the blueprints, would really be appreciated.

Product Version: UE 4.13
more ▼

asked May 12 '18 at 10:13 PM in Blueprint Scripting

avatar image

1 1

avatar image salm May 13 '18 at 01:27 PM

"I tried, but no luck" is not enough info to help. you have to give details. Exactly what did you try. Exactly what doesn't happen? I suspect your collision settings aren't set properly.

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

2 answers: sort voted first

to do as your describing you will first need to create the door actor bp, then within the event graph create a custom event called open door. then in your level create a box trigger and also drag in the door bp. now with the trigger box selected open the level bp and right click the graph and search for on actor begin overlap, it should be near the top. once you have the begin overlap event drag off the other actor pin and search for cast to firstPersonProjectile. this will create a cast node which will make it so the following script can only run when the trigger box is being overlapped by a projectile. next go back to your level and select the door that you placed, go back to the level bp and right click the graph and and you will see a option that says create reference to door (or whatever you named the bp). once you have the reference drag off of it and search for the custom event made in the first step. see the picture below for how things are setup in the level bp.

alternatively you could create all of this within the door bp but the methods would be a little bit different.

alt text

capture.png (76.6 kB)
more ▼

answered May 12 '18 at 10:43 PM

avatar image

10.1k 33 10 25

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

Make sure your bullet actor's Mesh has a collision primitive. Otherwise it won't be able to trigger collision or overlap events for your door sensor to detect.

more ▼

answered May 16 '18 at 08:18 PM

avatar image

3.8k 18 23 20

(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