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"

How to cast to another blueprint?

I have a UI widget elevatorButton6. When player press the button on this widget, I want to launch a bluerint bp_elevatorButton6, but I can't cast to it

Widget

alt text

Here I use interface bpi_elevatorButton:

alt text

Product Version: UE 4.20
Tags:
more ▼

asked Sep 07 '18 at 07:25 AM in Blueprint Scripting

avatar image

dmitry.kozyr
38 7 10 15

avatar image ThompsonN13 Sep 07 '18 at 01:14 PM

for the object pin you need a reference to a instance of that blueprint that exists in the level. there are many ways to do this via things like traces, public variables, setting a variable when the widget is created, etc.

without knowing more about the situation its hard to say which method to use. from the look of it you have a elevator bp and when near it a widget appears to call the elevator or choose a floor. if thats the case and your creating the widget from the elevator bp then its a pretty simple matter to create a variable in the widget and set its value when the widget is created. to do this, when the widget is created drag off the return pin and search for the variable you created in the widget and select the set (insert variable name here).

avatar image Nebula Games Inc Sep 07 '18 at 02:10 PM

Yea, what exactly is going on here? I can't tell if you are trying to reference another widget or another actor with you cast.

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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