Download

BP Spline sttaic mesh: how to know number of items placed!

Hi,
I’m using this Bp to use a spline for placing static meshes.

Nuova immagine.jpg

I need to know how many items I place for each spline, how can I do?
I’ve found a “get number of pieses” function but I don’t know if it’s the right one and how to connect it with my BP, any help please??? :confused:

Just make a variable, and increment it each time you place an item.

Ok thanks, any example??? Thank you very much :slight_smile:

I’ve tried but I must miss something!!! I set a count variable aand made it visible with a print string but the count isn’t correct, it shows me a random number that changes with no logic when I draw my spline (and that means when the spline add or remove meshes) :confused:

Your for loop defines how many static meshes will be created. Your “last index” of your for loop is equal the number of static meshes.

Here is an example that shows both most reasonable ways to do it, you can pick which one. If you ever choose to do ‘for loop with break’ instead of ‘for loop’, then use option 1. a.png

Ok, I’ve tried Option1 but something still missing… :confused:, Can you check my Bp, please and tell me where I’m going wrong???
Thanks,
BP_NumItems.jpg

Well, if you want to see how many items, print string ‘num items’.

Yeah ok you’re right; I did it but it shows me random number as I draw my spline, foth and back; wrong connections, maybe?

BP_NumItems1.jpg