I have created 5 cubes that have to be at a certain location to open the door. Could I get help as to how to do this in blueprints please? Pictures will help also.
I want these five cubes to be at a certain location. Once they have all been moved to a certain location a door will open. How do I do this in blueprints? Any images will help please. I am a beginner so please describe to me so I can understand.
asked Feb 09 '19 at 05:41 AM in Blueprint Scripting
this is just a high level overview: assuming you want to move the cubes by picking them up and you're using a first person perspective. you need to run a linetrace/spheretrace in the direction your camera is facing, if the trace hits the cube you pick it up either with a physics handle or with the attach actor to component function. the specific location should probably be it's own bp with a collision volume. every time something begins and ends overlapping that volume just 'get all overlaping actors' and run a loop through the array counting up how many cubes are in it. if the number is greater that 5 open the door.
as for the door bp, just use google there are a number of tutorials covering how to set up a timeline to open a door.
On udemy the most popular course for ue4 has a escape room project that is just like what you wanting. udemy puts all their classes on sale for about 10 bucks every few weeks, so price should drop around valentines day. https://www.udemy.com/unrealcourse/
answered Feb 09 '19 at 06:42 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here