Blueprint struct values not being set

K,

So after mucking about with different stuff I found that I could make a struct to hold some data I want.
Basic data for a tile (x, y, a* scores and parent x,y)
So I was following the procedural videos from Epic and then all of a sudden he just went and now I have a full game gj team we succeeded… but I digress.

I’m trying to just set the x/y of the tile when I am filling the array but this apparently doesn’t work cause later the xy are just 0.
I tried putting it with another for loop just to check if it would work but to no avail…Wondering if someone can take a look and see what I’m doing wrong because it’s probably something stupidly easy but I just have no starting point of what is wrong with BP’s…

https://dl.dropboxusercontent.com/u/31340003/ThirdPersonBP.zip

Here’s the Bp’s and stuff I was using. Just have to drop the “Level Generator” BP into the scene.

Thanks.

Anyone have any clue? It’s weird to me that using set by ref doesn’t seem to actually set by ref…or at least retain it…

Hi

I will show you the way I added data to a Struct Array, see if it helps.

But downloading the Uasset prob will not help me :slight_smile: you would be better off posting a pic of you code where you add it to array.

Hmm, well I was following the livestream video and he never did an add for stuff, could be it I guess
This is what I got.

http://puu.sh/hcfU9/466547fbd4.jpg

http://puu.sh/hcg07/79404a74bc.png

http://puu.sh/hcg0z/6e428c3ff4.png

I do realize that in this case I could just use the coords I get from the / % to put the stuff in the right place but it won’t help me later if I can’t get the coords/tile type out of the array which is what I’m trying to fix…

The Determine function there isn’t fully fleshed out, I just started it for one wall to see if it would work (before going for the other 3 boundary walls).

Should just see if it’s the x = 0 wall for now and change it to another model but it’s not doing that either…

Well to my knowledge, a Struct is only 1 Variable.

So will only hold the last data placed in it.

I can not see you adding anything to an array. Give that ago for now.

So doing the set on the Array Elem won’t do what I was lead to believe then :stuck_out_tongue: Guess I’ll go and try to stop being dumb …be back later if it doesn’t work haha.

K well I guess I just need to change how I think in BP’s.

Got it working now but it’s still very strange to me that you can have a struct of stuff in an array and the set by ref doesn’t work on it…Guess I’ll just do it by array element from now on

Thanks a bunch!