# How to make an int variable, work in a different blueprint?

**URL:** <https://forums.unrealengine.com/t/how-to-make-an-int-variable-work-in-a-different-blueprint/333312>\
**Category:** Blueprint\
**Tags:** variables-communicat, unreal-engine, Blueprint, question\
**Created:** [September 24, 2015, 10:35pm UTC](https://forums.unrealengine.com/t/how-to-make-an-int-variable-work-in-a-different-blueprint/333312 "2015-09-24T22:35:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon35804172](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon35804172](https://forums.unrealengine.com/u/anon35804172)\
**Post date:** [September 24, 2015, 10:35pm UTC](https://forums.unrealengine.com/t/how-to-make-an-int-variable-work-in-a-different-blueprint/333312/1 "2015-09-24T22:35:03Z")

</div>

Hi,  
I am heaving a problem with how to make a int variable of one blueprint, ‘‘talk’’ to another.  
This is the situation:  
I have one blueprint that have 3 collision boxes. What i wanna to do is, when i click at the first one, it will read that variable int, that is connect to the function (On clicked), as 1.  
Then this int variable would set a node (Switch int) in another blueprint as 1, and make that certain function ,who is connected to the number one pin, activated.  
And so on for the other two buttons. Click on the second one, make int = 2 , then activate the (Switch int) on the other blueprint.  
I’ve tried a lot of options, but i cannot put it the thinks together to make it work.  
I really need some help, to understand all the concept.  
Thank you very much.

---

<div class="post-metadata">

**Author:** ![Jakey113G](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jakey113G](https://forums.unrealengine.com/u/Jakey113G)\
**Post date:** [September 25, 2015, 1:00am UTC](https://forums.unrealengine.com/t/how-to-make-an-int-variable-work-in-a-different-blueprint/333312/2 "2015-09-25T01:00:14Z")

</div>

After reading the description I believe what you need to do is expose the actors to each other so they can select the one they need to interact with, this is up to user preference how you wish to do this.

Then on the blueprints you can create a function that the other blueprints can call to change the int and activate your case.

* * *

This documentation has some examples of retrieving specific actors. [https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/FindingActors/Blueprints/index.html#getspecificactors](https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/FindingActors/Blueprints/index.html#getspecificactors)

---

<div class="post-metadata">

**Author:** ![anon35804172](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon35804172](https://forums.unrealengine.com/u/anon35804172)\
**Post date:** [September 25, 2015, 7:23pm UTC](https://forums.unrealengine.com/t/how-to-make-an-int-variable-work-in-a-different-blueprint/333312/3 "2015-09-25T19:23:16Z")

</div>

This documentation that you send me, didn’t manage to help, unfortunately.  
Is there another way that i can expose the actors?  
I got accessed none, off a reference variable of the other blueprint.  
I am kind of lost.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_359f4d3c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_359f4d3c](https://forums.unrealengine.com/u/anonymous_user_359f4d3c)\
**Post date:** [September 25, 2015, 7:44pm UTC](https://forums.unrealengine.com/t/how-to-make-an-int-variable-work-in-a-different-blueprint/333312/4 "2015-09-25T19:44:41Z")

</div>

Could you show some screenshots of your Blueprints?

---

<div class="post-metadata">

**Author:** ![anon35804172](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon35804172](https://forums.unrealengine.com/u/anon35804172)\
**Post date:** [September 26, 2015, 12:50am UTC](https://forums.unrealengine.com/t/how-to-make-an-int-variable-work-in-a-different-blueprint/333312/5 "2015-09-26T00:50:53Z")

</div>

![60270-blueprint2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/b/8/bb88dce6d25e19da6a754488ce26e76544ba315d.png)

In the first blueprint where there is the (linguage type int), i want that the certain number that is being set ,depending on the box clicked, fulfill that int number on the (switch on int). That way depending of my choice it will lead to the specific number at the (switch on int), triggering different thinks depending on the number.

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [September 26, 2015, 1:16am UTC](https://forums.unrealengine.com/t/how-to-make-an-int-variable-work-in-a-different-blueprint/333312/6 "2015-09-26T01:16:05Z")

</div>

Once you get object refrence (for example overlapping events of those collision boxes for example), cast it to your class (since get node you gonna use will return in diffrent type), grab pin from it and drop it in empty space of blueprint, context menu will open and there should be “Varables” category, there should be Get and Set nodes of variables from that object.

---

<div class="post-metadata">

**Author:** ![anon35804172](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon35804172](https://forums.unrealengine.com/u/anon35804172)\
**Post date:** [September 26, 2015, 6:54pm UTC](https://forums.unrealengine.com/t/how-to-make-an-int-variable-work-in-a-different-blueprint/333312/7 "2015-09-26T18:54:30Z")

</div>

I don’t know if i got the exactly idea, because i couldn’t manage to make it work.  
Could you please send some pictures of how would be like?  
I would appreciate a lot  
Thank you..
