Can i use two different actors in one actor void

is there a way to do somthing like this

void AMyActor::OnUse(SecondActor)
{
Check variable from this actor
Check variable from second actor
}

Basically i cant get a variable from one actor because its using a void from another actor, i was woundering there was anyway i could fix this in by taking advantage of parameters or somthing similar.

Can you explain better the question?

If i had a variable in ACharacter for example. I couldn’t access that variable in void AActor because they have two different voids. I was wondering if there was away around this.

What do you mean by 2 different voids? Sorry, i’m really not understanding what you want. Can you supply a more complete code example?

I think you misunderstanding what void means, void for types is like null for pointers, it means non of types or unknown type (if we talk about void pointers, which can point to any kind of data and can be casted to any type of data). By placing it before function name you declere that function has nothing to return.

I think you may confuse “void” with “function” and what you really talking about is overloading, use of same function name with different set of arguments types (for example you can have function with string as input, but also you can have function with same name just with objectof some class as input and you make that function getting some string from that object for excample). C++ supports that, but i’m not sure UE4 reflection system does so you might not use it in blueprints.