yes acccording to it yes but the variable is still noty getting anything …let me try the same method for it and figure out the problem Thanks anyways
Yes no worries, the issue is mostly likely the code logic on the for each loop or setting it variable.
The scope error is often in relation with breakpoint when it in another bp/function or wrong stepping in.
got the core of the problem …so the thing is the variable tower is an array and i am adding elements to the array in level blueprint and the code that does the same is being called after the function get static meshes so array is empty when it is called in the event construct.
Can you help me out a way around of it?
Sure, we usually use level blueprint for doing testing/prototype. So you gonna move that code to the BP_Tower or it UI itself.
To get your specific actors, you can use tag.
From your viewport, select a static mesh, detail panel, add tag:
Then from your bp, use the search node Get All actors of that tag name you just set:
Then just use a a for each to add your actors tag to your variable array.
There other solution/method which will be optimised for searching actors (especially if you have a huge amount) so it a consideration to be made for performance.
Thanks will try that
and thanks a lot
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.