How to get a pointer to an array? (BluePrint)

I want to set the values of several arrays using input parameters.
Right now I miss the asterisk.
void MyFunc(void *myPointer)

So this is the problem:
I want a reference to the input parameter which is an array.

I want to set the values of the array inside the event
7
5

The pass by reference checkbox is disabled.
6

Is there a trick or something to use pointers in blueprints?

Thank you very much

I think Pass by Ref is exactly what you’re looking f or?

yes it is

it looks to be enabled and not changeable in that screenshot…

But the warning says that no variable will be returned…
I’m going to try it… but wait for a crash

there is no crash… but it doesn’t work

You might try making it a function… there are some differences between functions and events. I’m not sure if that’s one of them.

1 Like

ok, i’m going to try it

fwiw, i did just try that with a function, and it looks like it works? at least, it doesn’t warn me, i haven’t setup a thorough test though

1 Like

I just did the test, it doesn’t work either.
what is fwiw?

‘for what its worth’ … hmm. unsure, apologies that that didn’t help. Frankly, I’d forgotten that pass by reference is even a thing in blueprint. :expressionless: probably something worth looking at.

Are you trying to set the whole array, or modify it?

1 Like

it is just setting the values… it’s for not repeating the same function several times just for a variable.

what I will do then is divide the function into three pieces.

unfortunately it’s variable is set right in the middle of the code…

Don’t worry about it. You tried.
I am very grateful to you!! :sparkling_heart:

This is what i have on an array input to a function

image

it is 4.27.2

1 Like

ok, i’m going to try it

It doesn’t work… not even changing the type of variable… this type can be passed by reference but it doesn’t work…

It must be because of this part…

9

Okay, we tried it. I will divide the event into several parts.
I think it’s going to be the only way to get it.
Thank you very much for trying to help me.
You rockl!! :sparkling_heart:

1 Like

This way worked.
I put the array inside the team object.

10

At least I wouldn’t have to split the event.

Thx u so much!! a lot!! :slight_smile: