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"

Tring to cast variable from an actor bp to another

Hello, i am trying to get a button that when i get close to it sends the variable to the door which in turn opens it.

I've been trying to figure this out for hours now but can't seem to get anywhere.

Any help is very appreciated

alt text

This is the overlap of the button

alt text

this is where i try to cast the other actor, but it doesn't work

I am clearly missing something with the casting but I canonot find what

Product Version: UE 4.20
Tags:
screenshot-2.png (267.2 kB)
screenshot-3.png (333.6 kB)
more ▼

asked Aug 15 '18 at 12:46 AM in Using UE4

avatar image

Matthebest
8 2

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

1 answer: sort voted first

you never set the class on the get all actors of class node

personally though thats not the way i would go about setting up this script. what i would do is to use a public variable as the reference since its much cheaper, more reliable, and leads to a more versatile situation than using the get actors of class setup. to do this you would in your case create a variable in the door bp and sets its type via the details panel to the type clickbutton actor reference (as in the actor bp that you created). then hit the little eye box thing next to the variable in the panel on the bottom left to make it public. then once you place the door in the level you can select it and in the details panel you will be able to set the value of the variable.

my personal preference is usually to have the setup the other way around and have the switch reference the door but thats just me. hope that all helped

more ▼

answered Aug 15 '18 at 03:21 AM

avatar image

ThompsonN13
10.1k 33 9 23

(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