Ivan3z
(Ivan3z)
December 13, 2022, 4:46am
1
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
The pass by reference checkbox is disabled.
Is there a trick or something to use pointers in blueprints?
Thank you very much
eblade
(eblade)
December 13, 2022, 5:39am
2
I think Pass by Ref is exactly what you’re looking f or?
eblade
(eblade)
December 13, 2022, 5:42am
4
it looks to be enabled and not changeable in that screenshot…
Ivan3z
(Ivan3z)
December 13, 2022, 5:45am
5
But the warning says that no variable will be returned…
I’m going to try it… but wait for a crash
Ivan3z
(Ivan3z)
December 13, 2022, 5:47am
6
there is no crash… but it doesn’t work
eblade
(eblade)
December 13, 2022, 5:53am
7
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
eblade
(eblade)
December 13, 2022, 5:56am
9
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
Ivan3z
(Ivan3z)
December 13, 2022, 5:58am
10
I just did the test, it doesn’t work either.
what is fwiw?
eblade
(eblade)
December 13, 2022, 6:00am
11
‘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. probably something worth looking at.
Are you trying to set the whole array, or modify it?
1 Like
Ivan3z
(Ivan3z)
December 13, 2022, 6:05am
12
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…
Ivan3z
(Ivan3z)
December 13, 2022, 6:07am
13
Don’t worry about it. You tried.
I am very grateful to you!!
eblade
(eblade)
December 13, 2022, 6:08am
14
This is what i have on an array input to a function
it is 4.27.2
1 Like
Ivan3z
(Ivan3z)
December 13, 2022, 6:25am
16
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…
Ivan3z
(Ivan3z)
December 13, 2022, 6:31am
17
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!!
1 Like
Ivan3z
(Ivan3z)
December 13, 2022, 7:18am
18
This way worked.
I put the array inside the team object.
At least I wouldn’t have to split the event.
Thx u so much!! a lot!!