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"

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?

Product Version: UE 4.21
Tags:
more ▼

asked Mar 01 '19 at 11:04 PM in Blueprint Scripting

avatar image

MattStH
43 26 31 38

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Is there a way I can assign an integer value to a static mesh array?

Yes, in a Map. I saw a request for native support. For now, you'd need to relay on a struct:

alt text

Can you assign a specic integer value to each object in a static mesh array?

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.

Can you compare it if collided to show a specific image on a widget appear?

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.

capture.png (73.6 kB)
more ▼

answered Mar 02 '19 at 12:02 AM

avatar image

Everynone
15.2k 77 25 62

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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