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"

Multi Room Lever Door System

I am working on a project that includes puzzles, several of them including opening a door with a lever. How could i do this where I could reuse the blueprint in a different room and not affect all doors.

Product Version: UE 4.13
Tags:
more ▼

asked Nov 13 '16 at 12:00 AM in Blueprint Scripting

avatar image

BCC Gaming
3 1 2

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

2 answers: sort voted first

The is really simple to do, in fact this is implemented in the content example, just check out the button.

In the content example you have the same button used all over for different examples.

The proper way to do this is create a variable in your "lever" blueprint of type object (reference) and name it "DoorToOpen" or whatever you like, then make this variable editable (click the small eye icon next to it).

Now place your lever in the scene, and if you looks at the details property of your lever in the scene you will find a variable named DoorToOpen, select the color picker icon next to it and then pick whatever door you want it to open.

If you know you want the lever just to open doors, then in the first step instead of selecting your DoorToOpen variable type as object, choose your door BP it's easier to implement.

However if you want this lever to interact with different objects, then you should keep it as object or whatever BP class you have as parent for all intractable objects. But then you need to create an Interface, and implement it in blueprints you want the lever to implement with. That way you can make your level call the interface you created no matter the type of the object you created, and each object can react differently.

Here's link to more info about interfaces:

https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Types/Interface/UsingInterfaces/

Also here are some images of how to create the variable, in my case I chose a camera type variable, but you can pick whatever variable type you need.

alt text

alt text

I hope this helps :)

c1.png (317.4 kB)
c2.png (752.5 kB)
more ▼

answered Nov 13 '16 at 04:28 AM

avatar image

Night Watcher
1.7k 44 12 71

avatar image BCC Gaming Nov 13 '16 at 08:10 PM

Thank you. I really appreciate it.

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

answered Nov 13 '16 at 03:51 AM

avatar image

A GUPTA
4.1k 102 46 618

(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