# Using editable variables?

**URL:** <https://forums.unrealengine.com/t/using-editable-variables/339658>\
**Category:** Blueprint\
**Tags:** editable, casting, get-all-actors-from-, unreal-engine, Blueprint, question\
**Created:** [November 25, 2015, 2:27pm UTC](https://forums.unrealengine.com/t/using-editable-variables/339658 "2015-11-25T14:27:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0e3d41b3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0e3d41b3](https://forums.unrealengine.com/u/anonymous_user_0e3d41b3)\
**Post date:** [November 25, 2015, 2:27pm UTC](https://forums.unrealengine.com/t/using-editable-variables/339658/1 "2015-11-25T14:27:32Z")

</div>

I am trying to develop this method of door teleporting through the use of booleans and waypoints. The game consists of heading to doors that will lead to different places in different conditions.

What I do is:  
-check if the player is outside,

-then if so I get all actors of class of my waypoints in the level,

-each one of them have a position editable int and an arrow

- I added one in each side of the doors and their “Position” numbers.

- Then, I will check if the number of the waypoint is equal to a certain one (e.g. inside of kitchen)

- If true, get all actors of class of doors where each one has a door number Int

- If it’s equal to that door number, it will teleport to the waypoint whose “Position” variable it found by getting the location of the waypoint and also the rotation of the arrow and where it’s faced.

- There is a problem which is it sends me to the last waypoint number it exists, not the waypoint position variable I get.

- List item

Am I missing anything regarding get all actors of class?

I might be wrong, but I thought when it gets to the waypoint of my choice, it would also get it’s position.

---

<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:** [November 25, 2015, 4:38pm UTC](https://forums.unrealengine.com/t/using-editable-variables/339658/2 "2015-11-25T16:38:26Z")

</div>

You could post your blueprints so we can check if you do something wrong.

Also i think it would be better if you would use object varables insted of intigiers, i would let you skip whole finding all actors of class stuff. IF you use object varable and place object on the level in details tab in object varables you can pick diffrent actors on the level.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0e3d41b3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0e3d41b3](https://forums.unrealengine.com/u/anonymous_user_0e3d41b3)\
**Post date:** [November 25, 2015, 5:42pm UTC](https://forums.unrealengine.com/t/using-editable-variables/339658/3 "2015-11-25T17:42:13Z")

</div>

> **[tliwzqxk posted by UpARiver | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/tliwzqxk/)**
>
> No description provided

Also after the teleport, if I try to do a simple cast to character and set a variable from it, it simply doesn’t work, I’ve tried to print string but the code doesn’t go past the cast to character for some reason :/. Also thank you very much for trying to help!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0e3d41b3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0e3d41b3](https://forums.unrealengine.com/u/anonymous_user_0e3d41b3)\
**Post date:** [November 25, 2015, 7:28pm UTC](https://forums.unrealengine.com/t/using-editable-variables/339658/4 "2015-11-25T19:28:05Z")

</div>

Update :

> **[8u9-6yh8 posted by UpARiver | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/8u9-6yh8/)**
>
> No description provided

Tried doing a line trace to all the waypoints and if the 1st result that got hit was equal to the actor of the variable that this specific blueprint is referencing in the editor whose trigger I am overlapping then it would teleport me there. It seems this option also doesn’t work 😕

---

<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:** [November 26, 2015, 12:35am UTC](https://forums.unrealengine.com/t/using-editable-variables/339658/5 "2015-11-26T00:35:31Z")

</div>

That means it gets wrong object with wrong class then one you trying to cast to, or it gets none/null which makes cast automaticly fail. Put breakpoin on cast node and debug, when break gonna be triggered hover over, object input pin and see what object is going to cast node

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0e3d41b3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0e3d41b3](https://forums.unrealengine.com/u/anonymous_user_0e3d41b3)\
**Post date:** [November 26, 2015, 3:07pm UTC](https://forums.unrealengine.com/t/using-editable-variables/339658/6 "2015-11-26T15:07:20Z")

</div>

Thank you very much for the help! 😃

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0e3d41b3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0e3d41b3](https://forums.unrealengine.com/u/anonymous_user_0e3d41b3)\
**Post date:** [November 26, 2015, 3:12pm UTC](https://forums.unrealengine.com/t/using-editable-variables/339658/7 "2015-11-26T15:12:43Z")

</div>

Thanks to this video:

I found what I’m looking for. (Around 42:25 of the video he explains how to do it)

What you need for something like this is called Blueprint Interfaces.

If you place the blueprint interface in you character (the event) you will then be able to acess it elsewhere, and by using variables of the type of you blueprints (My target point, for example) you create a input in the blueprint interface with the type of your target point so you can get it’s position.

If you don’t understand how to do this have a look at the video or ask me, it sure clarified what I have been looking for a long time 😃

---

<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:** [November 26, 2015, 5:32pm UTC](https://forums.unrealengine.com/t/using-editable-variables/339658/8 "2015-11-26T17:32:20Z")

</div>

You don’t need interface for that, all you need is cast to object that has that function, it’s a common misunderstanding in blueprint-only UE4 community. Role of interface is not to communicate with diffrent blueprint (as i said it not needed for communication) but to relate unrealated classes with common function, for example Pawn and GameMode has a common function, you can tie them with interface and treat it as a common type.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0e3d41b3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0e3d41b3](https://forums.unrealengine.com/u/anonymous_user_0e3d41b3)\
**Post date:** [November 26, 2015, 5:34pm UTC](https://forums.unrealengine.com/t/using-editable-variables/339658/9 "2015-11-26T17:34:07Z")

</div>

Thank you very much for the explanation! 😃
