How to add/comapre an intrger value to a static mesh array
Is there a way I can assign an integer value to a static mesh array?
Can you assign a specic integer value to each object in a static mesh array?
Can you compare it if collided to show a specific image on a widget appear?
asked Mar 01 '19 at 11:04 PM in Blueprint Scripting
Yes, in a Map. I saw a request for native support. For now, you'd need to relay on a struct:
Since it's an array, it already has an index. If you need additional identifiers, you can use tags. Or you can wrap the static mesh + int in a struct and then put that in an array. And then put that in a Map, as above. Static Mesh INTception of sorts.
Show an image based on which static mesh you hit? Sure. For something simple you could use a Switch or a Select node. For something more complex and modular, a DataTable filled with structs or a [Static Mesh | Texture2d] Map. Many solutions may exist here, some better than other. Depends on what you're trying to achieve. Not enough info to advise with confidence.
answered Mar 02 '19 at 12:02 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here