x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: Not Selected
Tags:
more ▼

asked Apr 12 '15 at 01:15 PM in Blueprint Scripting

avatar image

TooL
48 1 54 12

avatar image TooL Apr 13 '15 at 11:48 AM

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...

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

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.

Narg

more ▼

answered Apr 13 '15 at 12:33 PM

avatar image

Narghile
1.7k 74 38 109

avatar image TooL Apr 13 '15 at 01:10 PM

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!

avatar image TooL Apr 13 '15 at 05:44 PM

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

(comments are locked)
10|2000 characters needed characters left

Hi Mate

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 :) you would be better off posting a pic of you code where you add it to array.

Narg

alt text

capture.jpg (60.5 kB)
more ▼

answered Apr 13 '15 at 12:16 PM

avatar image

Narghile
1.7k 74 38 109

avatar image TooL Apr 13 '15 at 12:28 PM

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. alt text alt text alt text

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...

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question