# Passing vector as parameter to console function

**URL:** <https://forums.unrealengine.com/t/passing-vector-as-parameter-to-console-function/423058>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [April 19, 2018, 4:01pm UTC](https://forums.unrealengine.com/t/passing-vector-as-parameter-to-console-function/423058 "2018-04-19T16:01:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zikoko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zikoko](https://forums.unrealengine.com/u/Zikoko)\
**Post date:** [April 19, 2018, 4:01pm UTC](https://forums.unrealengine.com/t/passing-vector-as-parameter-to-console-function/423058/1 "2018-04-19T16:01:08Z")

</div>

I have made a console function that has a Vector as an input parameter, but i’m not quite sure what syntax  
should I use to pass the param  
I’ve tried:  
0,0,0  
0.0.0  
0 0 0  
(0,0,0)  
(X=0,Y=0,Z=0)

But nothing works.  
Any idias?  
P.S. Other params, such as int float bool string are fine.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e2ade227](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e2ade227](https://forums.unrealengine.com/u/anonymous_user_e2ade227)\
**Post date:** [April 19, 2018, 4:58pm UTC](https://forums.unrealengine.com/t/passing-vector-as-parameter-to-console-function/423058/2 "2018-04-19T16:58:05Z")

</div>

How about this, pass a string as a the parameter and divide the string into X Y Z using a divider.

Solution 1 : Input : 34.5|56.05|23.67

Solution 2: Input X\_34.5|Y\_56.05|Z\_23.67

Solution 3: Input: 34.5 56.05 23.67 // Divide by space character

I will parse the values based on the position of ‘|’ and make a vector out of the 3 floats that i just parsed

---

<div class="post-metadata">

**Author:** ![Zikoko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zikoko](https://forums.unrealengine.com/u/Zikoko)\
**Post date:** [April 20, 2018, 7:27am UTC](https://forums.unrealengine.com/t/passing-vector-as-parameter-to-console-function/423058/3 "2018-04-20T07:27:19Z")

</div>

Thnx for answering.  
But the thing is that i’m looking for already complete solution in terms of ue4 console system.

It is not a problem to make parser for vector, aspecially when its already implemented, you can use “key=,value=” to build a string and than get from it what you need.  
Unfortunately it’s not what i’m looking for

---

<div class="post-metadata">

**Author:** ![Zikoko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zikoko](https://forums.unrealengine.com/u/Zikoko)\
**Post date:** [April 20, 2018, 8:12am UTC](https://forums.unrealengine.com/t/passing-vector-as-parameter-to-console-function/423058/4 "2018-04-20T08:12:53Z")

</div>

After debuging I found out that the (X=0,Y=0,Z=0) is working fine.  
But for some some reason it was not yesterday =(

Anyway, that is the answer!

---

<div class="post-metadata">

**Author:** ![seozero00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@seozero00](https://forums.unrealengine.com/u/seozero00)\
**Post date:** [March 13, 2024, 2:46am UTC](https://forums.unrealengine.com/t/passing-vector-as-parameter-to-console-function/423058/5 "2024-03-13T02:46:33Z")

</div>

I also need to use console function with vector as input parameter, can you show me the code?  
thank you

- Young, Seo
