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"

Can't get my door to open with a key

When I try to Set the boolean It wont chaalt textnge could somebody help me here are some screenshots

Product Version: UE 4.21 Preview
screenshot-234.png (225.9 kB)
more ▼

asked Oct 14 '18 at 02:28 PM in Blueprint Scripting

avatar image


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

1 answer: sort voted first

Another screenshot alt text

screenshot-233.png (226.9 kB)
more ▼

answered Oct 14 '18 at 02:31 PM

avatar image


avatar image ThompsonN13 Oct 14 '18 at 02:47 PM

you need to provide a object for the cast otherwise it will always fail. the object needed here is a instance of the door your looking to change the bool on. how you get the reference you need depends on the situation. if this is a key placed in the level then the easiest method would be to use a public variable of type actor or of the doors class.

create a variable, make its type actor, select the variable in the variable section and click the eye icon to make it public, drag it into the graph and select get, connect the variable to the object pin of the cast, place the key in the level, select the key in the level, in the details panel set the variable to the associated door.

thats pretty much all you need to do. you could also change the variable type to the doors class which would enable you to eliminate the need for the cast.

avatar image Dividual Oct 14 '18 at 02:50 PM

your cast isn't going to find the door for you. you could store a reference to the door you want the key to open in your key.

under variables, add another, change its type to Door Key, make it editable (the eye symbol needs to be open.) then in the editor where you placed the key, put the door you want the key to open into that variable on the key. then you an use that variable in your key instead of the cast.

(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