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 do I have a class blueprint call an event in a specific instance of another blueprint?

Hi New to blueprint scripting... here's my problem - I have several buttons. They are instances of a class blueprint that call an event in a different class blueprint. When the second finishes I need it to call an event in the specific instance of the first blueprint that called it. The buttons represent floors for an elevator. When the elevator blueprint finishes executing it needs to go back to the specific button instance to change its color. Help appreciated.

Product Version: UE 4.14
Tags:
more ▼

asked Mar 08 '17 at 10:48 PM in Blueprint Scripting

avatar image

SJ7777
1 1 1

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

1 answer: sort voted first

This might help, if I'm understanding what you want. On the event you call on your elevator class, and an input variable of the class of your Button blueprint. When you call the event on the elevator from your button, get a reference to self, and plug it into the event. (Right click, search for Self)

The elevator will now have a reference to the button that called an event on it.

In your Button class: alt text

In your elevator: alt text

button.png (51.0 kB)
elevator.png (45.5 kB)
more ▼

answered Mar 09 '17 at 12:49 AM

avatar image

Mosel3y
1.8k 49 20 67

avatar image SJ7777 Mar 09 '17 at 01:17 AM

That looks exactly what I need - one stupid question though - how do I add the additonal nodes - Im right clicking on the function but cant get the extra input node such as "Button" on your Activate Elevator?

avatar image Mosel3y Mar 09 '17 at 01:24 AM

If you click on the event in the graph, in the details panel you can add inputs by clicking the "New" button, in the Inputs category.

avatar image SJ7777 Mar 09 '17 at 01:58 AM

Thats great! Thanks so much for your help!

(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